TIME function

The TIME function converts a date/time duration, specified as a combination of days, hours, minutes and seconds, to number of seconds.

Syntax

TIME( values, format )

values - a list of one or more date/time durations (all values must use the same format)

format - format of the date/time duration (see Supported Formats)

Examples

TIME("1:47:67:80", "d:h:m:s") returns 259700

TIME("32:13:20", "h:m:s")  returns 116000

TIME("01:08", "dd:hh")  returns 115200

TIME(ARRAY("01:08","02:16"), "dd:hh")  returns 115200, 230400

Supported Formats

Colon-separated

  • hh:mm:ss
  • hh:mm
  • dd:hh:mm:ss
  • dd:hh:mm
  • dd:hh

Unseparated

  • d
  • h
  • m
  • s
  • ss
  • dd
  • mm
  • hh
  • ss
  • mmss
  • ddhhmmss

 

Related links: