In addition to using numbers in calculations, you can also use dates and times. For example, you can subtract one date from another, or retrieve all dates that are earlier than today. You can use dates that way because Access stores them as sequential numbers, or serial dates.
Let's look at some examples:
Subtracting dates is a quick way to calculate elapsed time. In this case, subtracting May 5 from June 4 could tell you how long it took for a critical part to arrive.
You can use comparison operators along with the And
operators. This expression returns all dates before (less than) February 3 and after (greater than) February 8. In other words, you're excluding several days of records from your results.
This expression does the opposite. It returns records for dates greater than February 3rd and less than February 8th.
This expression uses the Between ... And
operator and the Date
formula to return all records between now and the previous seven days.
Those are just a few of the ways you can work with dates. You'll get a chance to try them in the practice session, and of course, links in the Quick Reference Card take you to more information.