Start of change

SECONDS-FROM-FORMATTED-TIME

The SECONDS-FROM-FORMATTED-TIME function converts a time that is in a specified format to a numeric value that represents the number of seconds after midnight.

The function type is numeric.

Format

Read syntax diagramSkip visual syntax diagram FUNCTION SECONDS-FROM-FORMATTED-TIME ( argument-1 argument-2 )
argument-1
Must be a national, UTF-8, or an alphanumeric literal in either a time format or a combined date and time format. For details, see Date and time formats.
argument-2
Must be of the same type as argument-1.
If argument-1 is a time format, the content of argument-2 should be a time in that format.
If argument-1 is a combined date and time format, the content of argument-2 should be a valid date and time in that format.

Returned values

The equivalent arithmetic expression is ((H * 3600) + (M * 60) + S), where H is the portion of argument-2 corresponding to the hours subfield of argument-1, M is the portion of argument-2 corresponding to the minutes subfield of argument-1, and S is the portion of argument-2 corresponding to the seconds subfield of argument-1.

Example

If the format for the first argument is "hhmmss.ss+hhmm" and the value for the second argument is "05142781+0500", the returned value would be 18867.81. The same value would be returned if the format for the first argument is "YYYYMMDDThhmmss.ss+hhmm" and the value for the second argument is "19950215T051427.81+0500".

End of change