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.
- 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.
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".