|
<< Click to Display Table of Contents >> Navigation: 3. Script Language > Date and Time Calculation > TCA. - Time Calculation > TCA. - Time Calculation |
MiniRobotLanguage (MRL)
TCA.Format Timestamp
Build a Simple Timestamp with or without Time
Intention
Convert and Format numbers to a Timestamp.
Special cases for the Date-Values:
If a Date-Value is empty or zero ("0") then the current date will be returned.
Special cases for the Time-Value:
If Time is empty then only a Datestamp will be returned
If Time is "-" (minus) then the current time will be returned
Sample code:
$$DAY=
$$MON=
$$YER=
' Will not return the time because empty
$$TIM=
TCA.Format Timestamp|$$DAY|$$MON|$$YER|$$TIM|$$RET
MBX.$$RET

$$DAY=1
$$MON=2
$$YER=2019
' Will use current time because of the "-"
$$TIM=-
TCA.Format Timestamp|$$DAY|$$MON|$$YER|$$TIM|$$RET
MBX.$$RET
ENR.

Syntax
TCA.Format Timestamp|P1|P2|P3|P4|P5
Parameter Explanation
P1 - (optional) Day, numeric
P2 - (optional) Month, numeric
P3 - (optional) Year, numeric
P4 - (optional) Time, Format: 00:00:00 if empty time is omitted in the result, if "-", the system will use the current time.
P5 - (optional) Variable for result, if omitted the result will be on TOS.
Example
'***********************************
' TCA.-Sample
'***********************************
$$DAY=
$$MON=
$$YER=
$$TIM=
TCA.Format Timestamp|$$DAY|$$MON|$$YER|$$TIM|$$RET
MBX.$$RET
ENR.
Remarks
-
Limitations:
-
See also:
•