The FORMATTED-TIME function

ENTMF 

Description

The FORMATTED-TIME function returns a time string, in a requested format, from a supplied time in standard numeric time form. The function type depends on the type of argument-1 as follows:
argument-1 type Function type
Alphanumeric Alphanumeric
National National
UTF-8 UTF-8

General Format

FUNCTION FORMATTED-TIME (argument-1, argument-2,[argument-3])

Arguments

  1. Argument-1 must a literal of type alphanumeric, UTF-8 or national that contains a time format. See Date and Time Formats for details.
  2. Argument-2 must be a value in standard numerical time form representing time as seconds-past-midnight; see Standard Numerical Time Form in Date and Time Formats for more details.
  3. Argument-3, if specified, is an integer representing the offset from Coordinated Universal Time (UTC) in minutes. It must have a magnitude of less than or equal 1439 (which is one minute less than a day); see UTC Offset Value in Date and Time Formats.
  4. Argument-3 must not be specified if the format in argument-1 does not request UTC or offset time. If the format in argument-1 requests UTC or offset time but argument-3 is not specified, an offset value of 0 will be assumed when evaluating the function.

Returned Values

  1. The returned value is a string containing the time in argument-2 in the format corresponding to argument-1.
    • If the format in argument-1 requests the returned value to be expressed in UTC, the local time in argument-2 will be adjusted by the offset in argument-3.
    • If the format in argument-1 requests the returned value to be expressed in offset time, the value in argument-2 will be expressed directly in the time portion of the returned value and the offset from UTC in argument-3 will be expressed directly in the offset portion of the returned value.