%TimeToStr function


Function
The function converts an absolute time to a text string according to entered mask.


Declaration
TEXT %TimeToStr(
   TIME in TimeA, 
   TEXT in mask
 )
Parameters
timeAAbsolute time.
maskThe time format of the result string.
Note
The position of individual time components is given by the occurrence of the following strings in the entered mask.

StringDescription
yyyy or rrrr4-digit year representation.
yy or rrLast two digits of the year.
mmMonth
ddDay
hhHour
hb, HHTrading hour - hour in the day from 1 to 25.
miMinute
ssSecond
mssMillisecond
ttttName of day in week *.
ttt3-character shortcut of the name of the day in week *.
tt2-character shortcut of the name of the day in week *.
ZZZUTC offset in hours using format "(+|-)hh".
ZZZZZUTC offset in hours and minutes using the format "(+|-)hhmi".
ZZZZZZUTC offset in hours and minutes using the format "(+|-)hh:mi".

Only the first appearance of given time component in mask is being replaced. In case of multiple masks of the same time component with different lengths (e.g. yy and yyyy), only the longest one will be replaced.

When switching from summer to winter time (when the time interval 2:00 - 3:00 is repeated), the function returns the same text value for the first and second interval, therefore it is not possible to distinguish which interval it is.

Example
 %TimeToStr(M.TiA_01, "hh:mi:ss.mss dd-mm-rrrr")
Napíšte komentár