sec2time | Convert seconds to time format |
-f <sec-field> | field containing seconds |
-fout <time-field> | field to be created |
[-sep <separator>] | separator |
time2sec | Convert time format to seconds |
-f <time-field> | field including seconds |
-fout <sec-field> | field to be created |
[-sep <separator>] | separator |
The command converts seconds to a time format. Seconds are represented as integers, and the time format as a string. The separator in the time format is optional with the default value `:'. Thus, the default time format is hh:mm:ss.
Example: The example shows, how conversions between seconds and the time format can be performed.
... NDA> getdata time1 3 12:34:56 NDA> time2sec -f time1 -fout secs NDA> getdata secs 1 45296 NDA> sec2time -f secs -fout time2 -sep . NDA> getdata time2 3 12.34.56