How to Calculate Time Intervals in Access 2010


show more Calculating time intervals provides you with in-depth training on Business. Taught by Adam Wilbert as part of the Access 2010: Queries in Depth show less
please wait ...

Calculating time intervals

Now that we know how to tell Access to return today's date and time, we can use that information to help obtain query results that are relative to today. We have two different functions that will return slightly different results depending on the type of question that we're trying to ask. The DateAdd function will allow us to specify a time frame such as the past 30 days or within the last year and return records within that timeframe. The DateDiff function will allow us to find how many days have elapsed between today and a specific event. We'll take a look at how we can apply each in our queries with some real world examples.

First let's take a look at the DateAdd function. We'll go to the Create menu and in Query Design and we'll add our table Orders. Go ahead and say Close to the Show Table window and in the first field let's just put in the Field for today's date, date(). Now let's add a DateAdd function. In the next field we'll right-click and...

Calculating time intervals
Video duration: 6m 55s 3h 2m Intermediate

Viewers:

Calculating time intervals provides you with in-depth training on Business. Taught by Adam Wilbert as part of the Access 2010: Queries in Depth

Subject:
Business
Software:
Access
Author:
please wait ...