Tuesday, August 23, 2011
Function FormatTime(TimeElapsed As Integer) As String
Dim Seconds As Integer
Dim Minutes As Integer
Dim Hours As Integer
'Find The Seconds
Seconds = TimeElapsed Mod 60
'Find The Minutes
Minutes = (TimeElapsed \ 60) Mod 60
'Find The Hours
Hours = (TimeElapsed \ 3600)
'Format The Time
If Hours > 0 Then
FormatTime = Format(Hours,"00") & ":"
End If
FormatTime = Format(Hours, "00") & ":"
FormatTime = FormatTime & Format(Minutes, "00") & ":"
FormatTime = FormatTime & Format(Seconds, "00")
End Function
Labels: ASP
0 Comments:
Subscribe to:
Post Comments (Atom)