Get Hours, Minutes, AND Seconds between 2 Dates (or of total seconds)
This code will enable you to take two dates, find the total seconds in between them, and calculate the Hours, Minutes, and Seconds.
Original Author: Sparq
Code
Dim H, M, S, Secs as Long
Secs = DateDiff("s", Date1, Date2)
H = Int(Secs / 3600)
Secs = Secs - (H * 3600)
M = Int(Secs / 60)
Secs = Secs - (M * 60)
S = Secs
MsgBox Format(H, "00") & ":" & _
Format(M, "00") & ":" & _
Format(S, "00")
Loading Comments ...
Comments
No comments have been added for this post.
You must be logged in to make a comment.