The SECONDS-FROM-FORMATTED-TIME Function

ENTMF 

Description

The SECONDS-FROM-FORMATTED-TIME function returns a numeric value representing the number of seconds after midnight for a given time. The type of this function is numeric.

General Format:

FUNCTION SECONDS-FROM-FORMATTED-TIME (argument-1, argument-2)

Arguments

  1. Argument-1 must be a literal of type alphanumeric, national, or UTF-8 in a valid time or combined date time format. See Date and Time Formats for details.
  2. Argument-2 must be the same type as argument-1.
  3. The content of argument-2 should be formatted as specified by the content of argument-1:
    • If argument-1 is a valid time format, argument-2 should be a valid time in that specified format.
    • If argument-1 is a valid combined date time format, argument-2 should be a valid date and time in that specified format.
      Note: The specified date value will not impact the result of this function.

Returned Values

  1. The returned value is a positive numeric representing the given time as the number of seconds past midnight. It is obtained from the calculation ((h * 3600) + (m * 60) + s), where:
    • h represents the hours elapsed since midnight.
    • m represents the minutes elapsed since the beginning of the hour.
    • s represents the seconds elapsed since the start of the minute.