Click to See Complete Forum and Search --> : Time problems?!


Palin00
July 17th, 2000, 07:36 PM
How do I subtract two time's that are in short form(23:05) to get the difference in a integer.
Example
time1 = 15:02
time2 = 20:02

total = time2 - time1
total should be equal to 5 hrs but it doesn't work
Is there is a function for this.

adcomp
July 17th, 2000, 09:47 PM
datediff("h",time1,time2)

Palin00
July 17th, 2000, 10:05 PM
This is very helpful thank you, but is there a way to get the minutes in a decimal format behind the hours like 7.25 (7 hours and 25 minutes)

Thank you ahead of time

AnneWright
July 18th, 2000, 04:25 AM
Try:

datediff("n",time1,time2)/60

Regards


Anne Wright
Wright Computing