HmsToHr


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

Syntax

nHours = HmsToHr( sHms )

where

    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).

  

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

Related Topics

HrToHms

ParseHours