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

Decimal To HMS Function
Dates Times Class

Public Function DecimalToHMS( _
    ByVal vDecimalHours As Variant _
    ) As Variant

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

Examples:
    DecimalToHMS(4.5555) = 4.33198
    DecimalToHMS( 4.76) =  4.4536
    DecimalToHMS(-4.76) = -4.4536
See also:
    HMSToDecimal Function
    FormatDMSH Function
Return value: The return value will (usually) be a number in which 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.
vDecimalHours: A floating-point number which represents a number of hours. For example, .5 represents 1/2 hour or 30 minutes. Function returns Null if vDecimalHours is Null or cannot be fixed up to a number.

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