FORMATTED-TIME
The FORMATTED-TIME
function uses a format
to convert a value that represents seconds past midnight to a formatted
time of day in the requested 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 a numeric value in standard numeric time form. For details, see Standard numeric time form.
- argument-3
- Argument-3 is an integer representation of
the offset from Coordinated Universal Time (UTC) expressed in minutes.
If argument-3 is specified, the magnitude of the
value must be less than or equal to 1439. For details, see UTC offset value.Note: The offset value 1439 represents 23 hours and 59 minutes, which is one minute less than a day.
Returned values
- The returned value is a representation of the standard numeric time contained in argument-2 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-2 by the offset in argument-3.
- If the format in argument-1 indicates that the time is returned as an offset from UTC, the value in argument-2 is reflected directly in the time portion of the returned value, and the offset in argument-3 is reflected directly in the offset portion of the returned value.
Example
If the first argument has the format "hhmmss.ss+hhmm", the second argument the value "18867.812479168304" which represents the local time, and the third argument the value "-300", which represents the five hours that Eastern Standard Time (EST) differs from UTC, the returned value would be "05142781-0500".