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 TouchToneTommy on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

How to calculate total minutes from two dates/times in a query? 2

Status
Not open for further replies.
Sep 10, 2002
150
US
I have two dates and times, example 12/10/2005 1:29:22 PM and 1/6/2006 4:13:10 PM
How can I have a query take these two dates and return the total number of minutes?
 
Code:
DateDiff("n",FirstDate,SecondDate)

Have fun! :eek:)

Alex Middleton
 
The two dates are generated from another query, and there will be a big list of them. Can I use datediff to use that data? Something akin to Datediff ("n",[Field1},[Field2])? Im not familiar with the datediff command.
 
Another way:
TotalMinutes: Int(1440*([Some date field]-[Another date field]))

Hope This Helps, PH.
Want to get great answers to your Tek-Tips questions? Have a look at FAQ219-2884 or FAQ181-2886
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top