Formatting calculated elapsed time

kbrooks

Still learning
Local time
Yesterday, 18:35
Joined
May 15, 2001
Messages
202
Through other threads here I was able to calculate the elapsed time between 2 date/time fields.
ActualElapsedTime: Int([StopActual]-[Start]) & " day " & Format([StopActual]-[Start],"h"" hr ""n"" min ""s"" sec""")

It gives results like: 1 day 4 hr 5 min 0 sec

Can I change it to give results as: 28 hr 5 min

I guess the better question is how do I change it, since I'm sure it can be done.

Thanks!
 
Try this....

ActualElapsedTime: Int([StopActual]-[Start])*24 & " hours " & Format([StopActual]-[Start],"n"" min ""s"" sec""")

heres another way...

ActualElapsedTime: DateDiff("h",[Start],[StopActual]) & " Hours " & DateDiff("n",[Start],[StopActual])-DateDiff("h",[Start],[StopActual])*60 & " minutes"
 

Users who are viewing this thread

Back
Top Bottom