TODAY
Syntax
![]()
Command
Mandatory parameter Optional parameter Mandatory keyword Optional keyword |
<Variable> := TODAY.<Format>
Description
Returns current date and time in the specified format.
Diagram
Returned value type
Depends on the specified format, see the format list in the parameters section below.
Parameters
Parameter | Description | |||
<Variable> | The name of the variable in which the result must be stored. | |||
<Format> | Format of the returned date or time. Valid formats are: | |||
Format: | Type: | Length: | Example: | |
CCYY-MM-DD | Alpha | 10 | 2024-03-04 | |
CCYYMMDD | Numeric | 8 | 20040506 | |
CCYYMMDDHHMMSSNNN | Numeric | 17 | 20240304143842800 | |
DATE-NUM | Numeric | 6 | 050604 | |
DATETIME | Alpha | 23 | 2024-03-04 14:38:42:800 | |
DAY | Numeric | 2 | 06 | |
DAYNUM | Signed |
6 |
038111 | |
DDDD | Alpha | 15 | THURSDAY | |
DDMMMYY | Alpha | 7 | 06MAY04 | |
HHMMSSNN | Numeric | 8 | 10464426 | |
HHMMSSNNN | Numeric | 9 | 143842800 | |
MMDDYY | Numeric | 6 | 050604 | |
MMMDDYY | Alpha | 7 | MAY0604 | |
MONTH | Alpha | 3 | MAY | |
MONTH-NUM | Numeric | 2 | 05 | |
TIME | Alpha | 12 | 14:38:42.800 | |
WEEKDAYNO | Numeric | 1 | 5 | |
YEAR | Numeric | 2 | 04 | |
YYMM | Numeric | 4 | 0405 | |
YYDDD | Numeric | 5 | 04127 | |
YYMMDD | Numeric | 6 | 040506 | |
YYMMMDD | Alpha | 7 | 04MAY06 |
Remarks
When using the time formats (E.g. HHMMSSNN) the NN stands for hundredths of a second.
The date that represents daynumber zero for the DAYNUM format can be found in the Application Options on the Dates node. See also, SI-BASE.
Examples
date_now := today.yymmdd
time_now := today.hhmmssnn
time_now := today.hhmmssnn