<-- Previous || Up || Next -->

HMS To Decimal Function
Dates Times Class

Public Function HMSToDecimal( _
    ByVal vHMS As Variant _
    ) As Variant

"Hours Minutes Seconds To Decimal Degrees"
Convert number representing Hours, Minutes, and Seconds into a decimal number of hours.
Converts 12.345678 (representing 12h 34m 56.78s) to 12.5824388

    HMSToDecimal(4.33198) =  4.5555
    HMSToDecimal( 4.4536) =  4.76
    HMSToDecimal(-4.4536) = -4.76
See also:
    DecimalToHMS Function
vHMS: A number which represents hours, minutes, and seconds in "HMS" format. Function returns Null if vHMS is Null or cannot be fixed up to a number. In an HMS format number, the integer part represents hours, the first two floating point digits represent minutes, the next two digits represent seconds, and the remaining digits represent a fractional number of seconds.

Copyright 1996-1999 Entisoft
Entisoft Tools is a trademark of Entisoft.