Porovnávané verzie
Kľúč
- Tento riadok sa pridal
- Riadok je odstránený.
- Formátovanie sa zmenilo.
%TimeToStrEx function
Blok kódu | ||||
---|---|---|---|---|
| ||||
TEXT %TimeToStrEx( TIME in TimeA, TEXT in mask, TEXT in timeZone := %GetCurrentTimeZone() ) |
TimeA | Absolute time. | ||||||
mask | The time format of the result string. | ||||||
timeZone |
|
String | Description |
---|---|
yyyy or rrrr | 4-digit year representation |
yy or rr | Last two digits of year |
mm | Month |
dd | Day |
hh | Hour |
hb, HH | Trading hour - hour in day from 1 to 25. |
mi | Minute |
ss | Second |
mss | Millisecond |
tttt | Name of day in week *. |
ttt | 3-character shortcut of the name of day in week *. |
tt | 2-character shortcut of the name of day in week *. |
ZZZ | UTC offset in hours using format "(+|-)hh". |
ZZZZZ | UTC offset in hours and minutes using format "(+|-)hhmi". |
ZZZZZZ | UTC offset in hours and minutes using 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.
The function is conformable with the function %TimeToStr, besides the differences during conversions of ambiguous time - changes of daylight saving and standard time - the function displays the time together with the character A or B according to daylight saving time (A) or standard time (B).
A and B characters are used for the transition hour that depends on the time zone. In time zone GTM+1, the character is used at 2 a.m. of the local time. In time zone GMT+2 it is used at 3 a.m. of the local time, etc.
Example: A2:10:00 26-10-2003 (for time zone GMT+1)
If format mask contains UTC offset component, then A/B syntax for ambiguous time is not used.
Blok kódu | ||||
---|---|---|---|---|
| ||||
%TimeToStrEx(M.TiA_01, "hh:mi:ss.mss dd-mm-rrrr") |