FORMATTED-DATETIME
The FORMATTED-DATETIME
function uses a
combined date and time format to convert and combine a date in the
integer date form and a numeric time expressed as seconds past midnight
to a formatted date and time representation according to that combined
date and time format.
The type of this function depends on the type of argument-1 as
follows:
argument-1 type | Function type |
---|---|
Alphanumeric | Alphanumeric |
National | National |
UTF-8 | UTF-8 |
- argument-1
- Must be a national, a UTF-8, or an alphanumeric literal.
- argument-2
- Must be in integer date form. For details, see Integer date form.
- argument-3
- Must be a numeric value in standard numeric time form. For details, see Standard numeric time form.
- argument-4
- Must be an integer specifying the offset from Coordinated Universal Time (UTC) expressed in minutes. If argument-4 is specified, the magnitude of the value must be less than or equal to 1439. For details, see UTC offset value.
Returned values
- The returned value is a representation of the date contained in argument-2 combined with the time contained in argument-3 according to the format in argument-1.
- If the format in argument-1 indicates that the returned value is expressed in UTC, the time portion of the returned value reflects the adjustment of the value in argument-3 by the offset in argument-4.
- If the format in argument-1 indicates that the time is to be returned as an offset from UTC, the value in argument-3 is reflected directly in the time portion of the returned value, and the offset in argument-4 is reflected directly in the offset portion of the returned value.
Example
If the first argument has the format "YYMMDDThhmmss.ss+hhmm", the second argument the value "143951", the third argument the value "18867.812479168304", and the fourth argument the value "+300", the returned value would be "19950215T05142781+0500".