Counting dates

  • Thread starter Thread starter Beth McLaren
  • Start date Start date
B

Beth McLaren

What formula within a query do you use to count dates, i.e. 5/1/09 through
6/4/09 for example....????
 
DateDiff("d", #5/1/2009#, #6/4/2009#) will return the number of days
(I'm assuming you want days).

Assuming your data is actually in table fields;

DateDiff("d", [Field1], [Field2])

If you want to include the second field in the returned result you'll
have to add one;

DateDiff("d", [Field1], [Field2]) + 1
 
Back
Top