Time passed in Hrs and Min

  • Thread starter Thread starter Guest
  • Start date Start date
G

Guest

I have a contact/Task list that I use to track the Date, Start Time and End
time going a task. I have done it like this Time:[End_time]-[Start_Time] in
the hope that it would give me the Hrs and Min that was spent on that task or
phone call. I get a long number. How can I get it in a HR/Min format ?
 
KAnoe said:
I have a contact/Task list that I use to track the Date, Start Time and End
time going a task. I have done it like this
Time:[End_time]-[Start_Time] in
the hope that it would give me the Hrs and Min that was spent on that task or
phone call. I get a long number. How can I get it in a HR/Min format
?

KAnoe,

((DateDiff("n",#01/01/05 22:00:00#,#01/04/05 01:09:00#) \ 60) & ":" &
Format((DateDiff("n",#01/01/05 22:00:00#,#01/04/05 01:09:00#) mod 60),
"00"))

Results: 51:09


Sincerely,

Chris O.
 
Thanks Ken and Chris!!

Chris2 said:
KAnoe said:
I have a contact/Task list that I use to track the Date, Start Time and End
time going a task. I have done it like this
Time:[End_time]-[Start_Time] in
the hope that it would give me the Hrs and Min that was spent on that task or
phone call. I get a long number. How can I get it in a HR/Min format
?

KAnoe,

((DateDiff("n",#01/01/05 22:00:00#,#01/04/05 01:09:00#) \ 60) & ":" &
Format((DateDiff("n",#01/01/05 22:00:00#,#01/04/05 01:09:00#) mod 60),
"00"))

Results: 51:09


Sincerely,

Chris O.
 
Ken,

This works if you have just two separate time fields. What about if I have
two date fields with respective time fields, as I need to calculate the time
difference between two times that sometimes carry over to the next day? i.e.
The time difference between [Time of Onset] which is the first time at
12/31/2005 18:00 and between [Time of Arrival] which is at 1/01/2006 02:00.
Thanks.


Ken Snell said:
HMTime: Format([End_time]-[Start_Time], "hh:nn")

--

Ken Snell
<MS ACCESS MVP>

KAnoe said:
I have a contact/Task list that I use to track the Date, Start Time and End
time going a task. I have done it like this Time:[End_time]-[Start_Time]
in
the hope that it would give me the Hrs and Min that was spent on that task
or
phone call. I get a long number. How can I get it in a HR/Min format ?
 
Back
Top