Calculate hours between 2 times.

RichGags

Registered User.
Local time
Today, 16:37
Joined
Jun 30, 2003
Messages
39
I have a form with these 3 fields. "Start" "end" and "Total Hours". How do I make "Total Hours" equal the number of hours between "Start" and "end".

(ie. Start= 7:00 PM, End= 11:00 PM, Total Hours field simple have a value of 4)

I Tried using the Expression builder in the TOTAL field and put this in Control Source:
= [END] - [START]

but I get this:
0.166666666666667

Thanks in advance.
 
Use the built in DateDiff() function.

Such as DateDiff("h",[start],[end]). It has a help file.

Just a note though. By searching the forums for "time difference" I found 3 articles that would have answered your question. Please make sure to search the forums before posting.

Thank you,
Pookatech
 
Last edited:
Thanks for your help. I did search before I asked but I searched for "time calculation"...My bad.


Thanks again :)
 
You should not double post your problem in the forums ...

This only confuses the people attempting to help you.

Myself and Pat Hartman has replied to your other post.

RDH
 

Users who are viewing this thread

Back
Top Bottom