Query - difference between dates

C

Candace

I have a query that contains 2 date fields (accessed from tables). I want to
add an additional field (not accessed from tables) that calculates the
difference (number of days) between these two dates. How do I arrange the
information on the "Field" line and the "Criteria" line to accomplish this
goal? I'm not familiar enough with the Report module of Access to accomplish
this by means of a report, so that's why I would like to do it inside the
query. Thanks.
 
O

Ofer Cohen

Two ways
On the field area write
DateDifference: [DateField1] - [DateField2]

Or, use the DateDiff function
DateDifference: DateDiff("d",[DateField1] , [DateField2])
 
Top