Counting dates

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....????
 
B

Beetle

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
 

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

Top