Retrieve time as an integer
Retrieves a time value as an integer. In Excel, time is represented as a fractional number, which may introduce floating‑point precision issues. Converting the time to an integer helps prevent unintended calculation results.
Syntax
Section titled “Syntax”MTS_TimeToHour(Time value)Parameters
Section titled “Parameters”-
Time valuedouble Time value
Return Values
Section titled “Return Values”-
Hourint Hour (0–23)
Syntax
Section titled “Syntax”MTS_TimeToHHMM(Time value)Parameters
Section titled “Parameters”-
Time valuedouble Time value
Return Values
Section titled “Return Values”-
HHMMint Hour and minute (0-2359)
Syntax
Section titled “Syntax”MTS_TimeToHHMMSS(Time value)Parameters
Section titled “Parameters”-
Time valuedouble Time value
Return Values
Section titled “Return Values”-
HHMMSSint Hour, minute, and second (0-235959)