Calculate difference of Date Time Value

G

Guest

I have two fields TIn and TOut. They both are Time Date values. I want to
calculate the diffence of these two fields and have the result diplayed in
hours worked. Thanks for your help.
 
J

John

Hi,
Assuming you have a field called HoursWorked

Enter the following as the ControlSource for the HoursWorked Field

=Format([TIn]-1-[TOut],"Short Time")

HTH

John
 
M

Marshall Barton

Tony said:
I have two fields TIn and TOut. They both are Time Date values. I want to
calculate the diffence of these two fields and have the result diplayed in
hours worked.


HrsWkd: DateDiff("n", TIn, TOut) \ 60 & Format(DateDiff("n",
TIn, TOut) Mod 60, "\:00")
 
G

Guest

Where do you enter this string?

John said:
Hi,
Assuming you have a field called HoursWorked

Enter the following as the ControlSource for the HoursWorked Field

=Format([TIn]-1-[TOut],"Short Time")

HTH

John
Tony Ramirez said:
I have two fields TIn and TOut. They both are Time Date values. I want to
calculate the diffence of these two fields and have the result diplayed in
hours worked. Thanks for your help.
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Top