I am using the following code so that I can add add times
together so that they don't reset themselves at 24:00, for
example 17:00 + 15:00 = 32:00 instead of 08:00.
Public Function FormatTime(dtmTime)
Dim Hours As Long
Dim Minutes As Long
If IsNull(dtmTime) Then Exit Function
Hours = Int(dtmTime * 24)
Minutes = (dtmTime * 24 - Hours) * 60
If Minutes = 60 Then
Hours = Hours + 1
Minutes = 0
End If
FormatTime = Hours & ":" & Format(Minutes, "00"
End Function
Unfortunately I now require to show my reports with seconds in my times - hh:mm:ss.
Could anyone assist in helping me add seconds to this
code? or would I require totally new code??? or at the very least point me in the right direction.
Thanks
together so that they don't reset themselves at 24:00, for
example 17:00 + 15:00 = 32:00 instead of 08:00.
Public Function FormatTime(dtmTime)
Dim Hours As Long
Dim Minutes As Long
If IsNull(dtmTime) Then Exit Function
Hours = Int(dtmTime * 24)
Minutes = (dtmTime * 24 - Hours) * 60
If Minutes = 60 Then
Hours = Hours + 1
Minutes = 0
End If
FormatTime = Hours & ":" & Format(Minutes, "00"
End Function
Unfortunately I now require to show my reports with seconds in my times - hh:mm:ss.
Could anyone assist in helping me add seconds to this
code? or would I require totally new code??? or at the very least point me in the right direction.
Thanks