Link to home
Start Free TrialLog in
Avatar of jorgeani
jorgeani

asked on

calculate total hours and minutes between two times but .....

I use this code...
Timediff = Format(CDate(TimeNow) - CDate(TimeFirst), "Long Time")

but if i change windows clock to the next day, for example:

now = 25-nov-2004 11:07:15
first = 24-nov-2004 11:00:00

i want to get this timediff:

24:07:15


no ....
0:07:15

can you help me?
ASKER CERTIFIED SOLUTION
Avatar of craigewens
craigewens

Link to home
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
Start Free Trial
Avatar of mmusante
mmusante

Try using DateDiff ...

DateDiff("n",#24/11/2004 23.30#,#25/11/2004 23.35#)/60.0
Avatar of jorgeani

ASKER

Thanks a lot!!!