How do I find a date difference?

D

dogman_2000

Hi

I have an Access 2002 database and 2 fields (date\time) in my table.
Lets say the fields are called Start_Date and End_Date.

I want to create a query and use my two fields. Then in another field I
want to use a function which returns the date difference, in number of
days, between the 2 fields.

For Example: Start_Date = 01/01/2006, End_Date = 21/01/2006, Difference
= 20.

I think I can use the DateDiff function but can't quite figure out how
it works.

Any help would be much appreciated.

Andrew
 
J

Jezebel

If you just want the difference in days, you can subtract one from the
other. Date values are just doubles in drag - the integer portion is the day
number, the decimal part is the time. So End_Date - Start_Date = 20.

Apart from that, if you can't figure out how to read Help on the DateDiff
function, you're probably in the wrong line of work.
 

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