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

Difference between 2 datestimes

Status
Not open for further replies.

Montana751

Programmer
Aug 14, 2001
64
US
I have to find out the hours/minutes/seconds difference between 2 datetimes. Any suggestions??

12/17/2003 3:40:09AM and 12/17/2003 3:40:33AM
12/15/2003 8:15:10PM and 12/18/2003 4:01:18PM

I have to show the difference as hours/minutes/seconds that have elapsed from the first datetime to the second datetime.
 
Try:

datediff("s",{table.date1},{table.date2})

Then apply my FAQ:

faq767-3543

-k
 
I had already tried that, but it only returns the seconds, how do I return the total hours, minutes & seconds of elapsed time????
 
Thanks that worked great. Sorry for missing the FAQ, see what I get for not paying attention.
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top