StrMonoToTime

StrMonoToTime

%StrMonoToTime function


Function

The function converts a given text to an absolute time.

Declaration

TIME %StrMonoToTime( TEXT in txtTime TEXT in txtMask INT in offset )

Parameters

txtTime

Text string that contains a time.

txtMask

Time mask used for recognition of items of a time defined by the parameter txtTime.

offset

Time offset [s].

Description

The function converts a time in text form to a time by defined mask. It assumes that time in text form is a monotonic one, with an offset (defined by the parameter offset) specified in seconds, from the UTC time.

Example

TEXT _tTxt TIME _t BEGIN ; conversion of monotonic standard time in text form to time ; for standard time _t := %StrMonoToTime("04:00:00 01-01-2005", "hh:mi:ss dd-mm-rrrr", 3600) _tTxt := %TimeToStrEx(_t, "hh:mi:ss dd-mm-rrrr") ; gets the value of "04:00:00 01-08-2005" ; for day-light saving time _t := %StrMonoToTime("04:00:00 01-08-2005", "hh:mi:ss dd-mm-rrrr", 3600) _tTxt := %TimeToStrEx(_t, "hh:mi:ss dd-mm-rrrr") ; gets the value of "05:00:00 01-08-2005" END