Converts time between internal and external formats.
||The time to be converted. An external time is represented as a string, such as 10:23:54. An internal time is represented as a numeric value, which is the second part of the Caché $H date/time format.
||This keyword specifies converting an external time to internal ($H) format.
||This keyword specifies converting an internal time ($H format) to external time format.
function returns an external time in the following format:
Leading zeros are displayed.
function returns an internal date/time in the following format:
Where sssss is the time count (number of elapsed seconds in the specified day), and ff is optional fractional seconds. Fractional seconds are preserved in converting from external to internal format; fractional seconds are truncated when converting from internal to external format. For further details, see $HOROLOG
in the Caché ObjectScript Reference
The following example takes an external time value, converts the time to an internal format ($HOROLOG) value, then converts this internal value back to an external format time.
Dim GetDT,InTime, ExTime
GetDT = "21:45:23.99"
InTime = TimeConvert(GetDT,vbToInternal)
ExTime = TimeConvert(InTime,vbToExternal)