FORMATTED-CURRENT-DATE
The FORMATTED-CURRENT-DATE
function returns a character string that
represents the current date and time provided by the system on which the function is evaluated. The
content of the returned value is formatted according to the format in the argument.
The function type depends on the argument type, as follows:
Argument type | Function type |
---|---|
Alphanumeric | Alphanumeric |
National | National |
UTF-8 | UTF-8 |
The returned value is a representation of the current date and time provided by the system on which the function is evaluated. The returned value is formatted according to the format in argument-1. The accuracy of the portion of the returned value that corresponds to the time format is determined by the z/OS® operating environment, up to and including millionth (1/1000000) of a second.
Example
Given the format "YYYYMMDDThhmmss.ss+hhmm" and a current z/OS operating environment timestamp of "1995-02-15 05:14:27.812479168304" Eastern Standard
Time, the returned value will be "19950215T05142781-0500".
Note: Given this particular format,
"YYYYMMDDThhmmss.ss+hhmm", the only difference between the returned value for
CURRENT-DATE
and that for FORMATTED-CURRENT-DATE
is the presence
of the character "T" that separates the date portion from the time portion in the returned value of
the latter function.