Porovnávané verzie

Kľúč

  • Tento riadok sa pridal
  • Riadok je odstránený.
  • Formátovanie sa zmenilo.

%StrMonoToTime function


Function
The function converts a given text to an absolute time.


Declaration


Blok kódu
languageesl
themeConfluence
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) compared to UTCspecified in seconds, from the UTC time.
Example


Blok kódu
languageesl
themeRDark
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