%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
txtTimeText string that contains a time.
txtMaskTime mask used for recognition of items of a time defined by the parameter txtTime.
offsetTime 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

0 komentárov

Nie ste prihlásený. Akékoľvek zmeny, ktoré vykonáte, sa označia ako anonymné. Ak už máte svoj účet, pravdepodobne sa budete chcieť prihlásiť .