Total Time: DateDiff("h",[Time IN],[Time OUT]) & ":" &
Format((DateDiff("n",[Time IN],[Time OUT])) Mod 60, "00")
Mod 60 divides by 60 and returns the remainder - so 365 mod 60 returns 5
In your case that eliminates the 60 minute groups that have been used to
give you the number of hours.
--
John Spencer
Access MVP 2002-2005, 2007-2008
Center for Health Program Development and Management
University of Maryland Baltimore County
..
Matthew Hinkle said:
Karl, Mike,
Sorry to butt in here.
Karl, this solution works great for me.
Except, What does the "Mod 60" do?
I am using this without the "Hours" and "Minutes" labels but added a colon
to make the results look like time, however if the result is an even
number
(i.e. 7 hrs) it displays as 7:0 instead of 7:00...
Mine looks like this:
Total Time: DateDiff("h",[Time IN],[Time OUT]) & ":" & (DateDiff("n",[Time
IN],[Time OUT])) Mod 60
Any suggestions for this?
KARL DEWEY said:
This will do it --
Worked: DateDiff("h", [IN_TIME], [OUT_TIME]) & "Hours " & (DateDiff("n",
[IN_TIME], [OUT_TIME])) Mod 60 & "Minutes"
--
KARL DEWEY
Build a little - Test a little
:
My query has an IN_TIME and an OUT_TIME with the date and time in same
field
like shown below
how can i figure out the actual time that employee has worked
IN_TIME
12/1/2006 8:47:03 AM
OUT_TIME
12/1/2006 6:52:13 PM
Thanks for any help