by Sparq (34 Submissions)
Category: Math/Dates
Compatability: Visual Basic 5.0
Difficulty: Beginner
Date Added: Wed 3rd February 2021
Rating: (4 Votes)
This code will enable you to take two dates, find the total seconds in between them, and calculate the Hours, Minutes, and Seconds.
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")
No comments have been posted about Get Hours, Minutes, AND Seconds between 2 Dates (or of total seconds). Why not be the first to post a comment about Get Hours, Minutes, AND Seconds between 2 Dates (or of total seconds).