Versions Compared

Key

  • This line was added.
  • This line was removed.
  • Formatting was changed.
Excerpt
hiddentrue

timeToSecs(durationString, separator) Converts a duration in hours, minutes and seconds into total number of seconds.

Function: timeToSecs()

Converts a duration in hours, minutes and seconds into total number of seconds. The hours or minutes part of the duration can be omitted.

Padding You can pad zeroes, e.g. for example 02:34 , are is allowed.

Syntax

timeToSecs(durationString,separator)

ArgumentTypeParameter TypesDescription
durationStringStringDuration in the format hh:mm:ss, mm:ss or ss.
separatorStringSeparator used between the individual parts of the duration.

Examples

ExampleReturns
timeToSecs("01:00:03",":")Returns 3603.
timeToSecs("2

...

03","

...

")Returns 123.
timeToSecs("43","

...

")Returns 43.

See Also

...



Excerpt
hiddentrue

timeToSecs(durationString, separator)   Converts a duration in hours, minutes and seconds into total number of seconds.