The following examples use the DateDiff function to calculate the number of calendar weeks between the first of the year and today, and the number of days since February 1, 1995 respectively.
Debug.Print DateDiff("ww", "1-1", Now())
Debug.Print DateDiff("y", #1-Feb-1995#, Now())
The next example shows how to use the DateDiff function in a query expression. Suppose you have an Orders table that contains an OrderDate field and a ShippedDate field. You can create a calculated field in a query to display the time elapsed between an order date and a shipped date for each order. In the Query window, create a new query by adding the Orders table and dragging the OrderID field to the query design grid. In an empty Field cell, enter the following to create a calculated field.
DaysElapsed: DateDiff("y", [OrderDate], [ShippedDate])