convert command: Examples
Examples for using the SPL2 convert command.
Converting values to seconds
The following example changes the duration values to seconds for the specified fields.
... | convert dur2sec(xdelay), dur2sec(delay)
Converting a time into the number of seconds to perform calculations on timestamps
The following example converts a time in MM:SS.SSS (minutes, seconds, and subseconds) format to a number in seconds. The mstime() function changes the timestamp to a numerical value. This is useful to perform calculations on timestamps.
... | convert mstime(_time) AS ms_time | select _time, ms_time
Additional examples
For additional examples see the individual convert functions in the convert command: Overview, syntax, and usage topic.
See also
convert command