FormatTime



Public Function FormatTime(ByVal sglTime As Single) As String
' Determine how to display the time

Select Case sglTime
Case 0 To 59' Seconds
FormatTime = Format(sglTime, "0") & " sec"
Case 60 To 3599 ' Minutes Seconds
FormatTime = Format(Int(sglTime / 60), "#0") & _
" min " & _
Format(sglTime Mod 60, "0") & " sec"
Case Else' Hours Minutes
FormatTime = Format(Int(sglTime / 3600), "#0") & _
" hr " & _
Format(sglTime / 60 Mod 60, "0") & " min"
End Select
End Function


(formattime.html)- by Paolo Puglisi - Modifica del 25/3/2019