Converting Time format to a Number

geraldcor

Registered User.
Local time
Today, 21:23
Joined
Jan 26, 2004
Messages
145
I am making a form to calculate time sheet hours and pay. We sign in on our time sheets by hand (I don't know why but we do) and they want to be able to enter these times into a form and have it spit out the pay amount for the employee. Not so bad, so I thought. I am having them input time in medium time format for ease of use. This totals up nicely at the end but I need to convert the total hours into a usable number for calculations. i.e. 7:30 total hours that day should translate to 7.50 hours etc. How do I do this conversion? Is is possible? Thank you.
 
Are you trying to get total number of hours worked? If so, use this in blank text box..control source.


DateDiff("h",[Start Time],[End Time])

hth,

Michael
 
Actually, you want the difference in minutes and you can divide that by 60 to get hours and a decimal fraction.

(DateDiff("n",[Start Time],[End Time]))/60
 

Users who are viewing this thread

Back
Top Bottom