PDA

View Full Version : Solved: Time Difference between two dates



mferrisi
07-12-2010, 06:26 AM
Hi,

I have two dates and need to determine the difference between them.
e.g.
6/10/2010 9:15:00 AM
and
6/9/2010 8:00:00 AM.

I want the variable and output to be displayed as hh:mm:ss, so that for instance, a difference would show up as 25:15 and not 1:15.

iDelay = Format(iDelay, "????????") ?


Thanks,

GTO
07-12-2010, 06:56 AM
There must be a way better way, but for just a display (as it will then be text)..

A2 holds 6/10/2010 9:15:00 AM
A3 holds 6/9/2010 8:00:00 AM.


=TRUNC((A2-A3)*24,0)&":"&ROUND(((((A2-A3)*24)-TRUNC((A2-A3)*24,0))*60),0)