HH:MM:SS to Number of Seconds
Description
Converts a text string containing time information (in HH:MM:SS format) to number of seconds.
Refer to Notes on Conversions for more details on how Data Prep Studio converts time fields.
Input/Output Data Type
Input |
Output |
text |
number |
Note: Input text must be in HH:MM:SS format.
Example
In this example, Time is the original column and Time - ToSeconds shows the converted values.
To interpret the conversion, we see that in row 1, 1 hour, 9 minutes, and 30 seconds (01:09:34) is converted to 4174 seconds, i.e.: (1 hour x 60 minutes x 60 seconds) + (9 minutes x 60 seconds) + 34 seconds.
© 2024 Altair Engineering Inc. All Rights Reserved.