Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations strongm on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

HELP! calculating differences between dates 1

Status
Not open for further replies.

Joels7

MIS
May 1, 2001
9
US
In a query, I want to subtract dates and get the number of days between as a result, so if in a given record, end_date=9/11/01 and start_date=8/31/01, a calculation field defined by (end_date - start_date) should evaluate to 11.

How do I accomplish this without getting an error msg.

I'd rather do it if possible with a simple function rather than a VB program

thank you,

Joels
 
Create a new field within the Query with the following:

Difference in days: DateDiff("d",[start_date],[end_date])

This will assign the difference in days to the field.

Lamaar75@hotmail.com
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top