Domain: Environment information (calendar)
The DATE( ) function determines the current date and returns it in the specified format.
Format
DATE( ) |
FORMAT = *ISO / *AMERICAN / *GERMAN ,MODE = *LOCAL-TIME / *UNIVERSAL-TIME |
Result type
STRING (<string 10..13>)
Input parameters
FORMAT = *ISO / *AMERICAN / *GERMAN
Specifies the format in which the date is output.
MODE = *LOCAL-TIME / *UNIVERSAL-TIME
Determines if the date is output in the local time (LOCAL-TIME) or in universal time (UNIVERSAL-TIME).
See also the GTIME macro in the “Executive Macros” manual [7] for more information on LOCAL-TIME (LT) and UNIVERSAL-TIME (UTC).
Result
Input parameter FORMAT = | Date format <string 10..13> |
*AMERICAN | mm/dd/yyiii |
*ISO | yyyy-mm-ddiii |
*GERMAN | dd.mm.yyyy |
iii | Day in current year (001 .. 366) |
Error messages
No error messages
Example
/G = DATE(FORMAT = *GERMAN) /SHOW-VARIABLE G G = 16.04.2007 /A = DATE(FORMAT = *AMERICAN) /SHOW-VARIABLE A A = 04/16/07106 /I = DATE( ) /SHOW-VARIABLE I I = 2007-04-16106
April 16th is the 106th day of the year 2007, which is why the representation of the date in the ISO format and in the American format contains the suffix 106.