Query - difference between dates

  • Thread starter Thread starter Guest
  • Start date Start date
G

Guest

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.
 
Two ways
On the field area write
DateDifference: [DateField1] - [DateField2]

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

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Back
Top