CONVERTTIME
CONVERTTIME(time)
Returns the time converted into decimal hours, minutes or seconds.
| time | The time to convert. |
REMARKS
'1:00:00 = 1
'01:15:00 = 1.25
'17:30:00 = 17.5
'16:00:00 = 16
'23:45:00 = 23.75
|
CONVERTTIME_HOURS
'simply multiply it by 24 'each hour can be represented as 1/24
Public Function CONVERTTIME_HOURS( _
ByVal sngTime As Single) As Double
CONVERTTIME_HOURS = (24 * sngTime)
End Function
CONVERTTIME_MINUTES
Public Function CONVERTTIME_MINUTES( _
ByVal sngTime As Single) As Double
CONVERTTIME_MINUTES = (24 * sngTime) * 60
End Function
CONVERTTIME_SECONDS
Public Function CONVERTTIME_SECONDS( _
ByVal sngTime As Single) As Double
CONVERTTIME_SECONDS = ((24 * sngTime) * 60) * 60
End Function
© 2026 Better Solutions Limited. All Rights Reserved. © 2026 Better Solutions Limited TopPrevNext