|
Returns the time value in specified format. Note that when using single character format description, then the time value will be returned in byte-format. |
|
TimeVal |
The time value that will be converted into string format |
Format |
The format that will be used when converting time value. |
modeBCD |
Determines what kind of method will be used when time value is converted to byte-value. Note the example below for the difference. |
|
global
procedure OnApplicationStartup()
begin
time t;
t = "11:12:13";
// returns 111213
stopalert(TimeToString(t,"HHMMSS",false));
// returns 0x0B 0x0C 0x0D (byte format)
stopalert(TimeToString(t,"HMS",false));
// returns 0x11 0x12 0x13 (BCD format)
stopalert(TimeToString(t,"HMS",true));
return;
end;
««