- hour - The hour for the time you wish to create.
- minute - The minute for the time you wish to create.
- second - The second for the time you wish to create.
How to use
The TIME function creates a valid Excel time based with supplied values for hour, minute, and second. Like all Excel time, the result is a number that represents a fractional day. The TIME function will only return time values up to one full day, between 0 (zero) to 0.99999999, or 0:00:00 to 23:59:59. To see results formatted as time, apply a time-based number format.
=TIME(3,0,0) // 3 hours =TIME(0,3,0) // 3 minutes =TIME(0,0,3) // 3 seconds =TIME(8,30,0) // 8.5 hours
The TIME function can interpret units in larger increments. For example, both of the formulas below return a result of 2 hours:
=TIME(0,120,0) // 2 hours =TIME(0,0,7200) // 2 hours
However, when total time reaches 24 hours, the TIME function will "reset" to zero.
=TIME(12,0,0) // 12 hours =TIME(36) // 12 hours
In this way, TIME behaves like a 24 hour clock that resets when it crosses midnight. Notably, TIME will not handle numeric inputs larger 32,767. For example, even though there are 86,400 seconds in a day, the following formula (which represents 12 hours) will fail with a #NUM! error:
=TIME(0,0,43200) // returns #NUM!
The result is the same as the TIME function up to 24 hours. Over 24 hours, this formula will continue to accumulate time, unlike the TIME function.
- When total time reaches 24 hours, the TIME function will "reset" to zero.
- The largest number that TIME will allow for hour, minute, or second is 32,767. Larger values will return a #NUM! error.