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!

Date and time comparisons in to determine elapsed time. 1

Status
Not open for further replies.

Varja

MIS
Aug 11, 1999
3
US
I need to know how I might make comparisons between 2 dates and times. The first date/time is a 'received' and a 2nd date/time is a 'shipped'. I have been given the task to produce a field 'elapsed time' in hours and minutes. Has anyone tackled this one before??
 
This should point you in the right direction...<br>
<br>
You can use the DateDiff function in your query. Create a new column that has the following Field definition:<br>
<br>
Diff: DateDiff("h",[StartDate],[EndDate])<br>
<br>
Your query will have a new field called "Diff" that represents the number of hours between the start & end date.<br>
<br>
Look-up DateDiff in help to get more info.<br>

 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top