HrToHms FormatTime

HmsToHr


The HmsToHr function converts a time string containing hours, minutes, and seconds to a decimal hour value.

Syntax

nHours = HmsToHr( sHms )

    sHms is a string containing hours, minutes, and seconds (e.g., "06:25:28.085").

    nHours is the returned time value in decimal hours (e.g., 6.424468).

Remarks

This function converts a string to a decimal number of hours. To do the reverse conversion, use HrToHms.

Related Topics

HrToHms, ParseHours