by Charlie (1 Submission)
Category: Miscellaneous
Compatability: Visual Basic 5.0
Difficulty: Unknown Difficulty
Originally Published: Sun 16th June 2002
Date Added: Mon 8th February 2021
Rating: (1 Votes)
Get the time diffrences between two different time variable (include date). Result will be in difference in days, hours, minutes, dan seconds
ByRef d As Long, ByRef h As Long, ByRef m As Long, ByRef s As Long)
'get time different in second
s = DateDiff("s", DTime1, DTime2)
'h is different in hours
h = Int(s / 3600)
'm is different in minutes
m = Int((s Mod 3600) / 60)
's is different in seconds
s = s Mod 60
If h >= 24 Then
'd is different in days
d = Int(h / 24)
h = h Mod 24
End If
End Sub
No comments have been posted about Get the time diffrences between two different time variable (include date). Result will be in diffe. Why not be the first to post a comment about Get the time diffrences between two different time variable (include date). Result will be in diffe.