Time() Function

The TIME function is a built-in function in Excel that is categorized as a Date/Time Function. It allows you to create a time with individual hour, minute, and second components. It returns a decimal number between 0 and 0.999988426 given an hour, minute and second value. A result of 0 represents 12:00:00 AM and a result of 0.999988426 represents 11:59:59 PM.

The TIME function is useful when you want to assemble a proper time inside another formula.

Syntax

The syntax for the TIME function in Microsoft Excel is:

=TIME( hour, minute, second )

Parameters or Arguments

hour

A number from 0 to 32767, representing the hour. If the hour value is greater than 23, it will be divided by 24 and the remainder will be used as the hour value. This means that TIME(24,0,0) is equal to TIME(0,0,0) and TIME(25,0,0) is equal to TIME(1,0,0) … and so on.

minute

A number from 0 to 32767, representing the minute. If the minute value is greater than 59, then every 60 minutes will add 1 hour to the hour value. This means that TIME(0,60,0) is equal to TIME(1,0,0) and TIME(0,120,0) is equal to TIME(2,0,0) … and so on.

second

A number from 0 to 32767, representing the second. If the second value is greater than 59, then every 60 seconds will add 1 minute to the minute value. This means that TIME(0,0,60) is equal to TIME(0,1,0) and TIME(0,0,120) is equal to TIME(0,2,0) … and so on.

Returns

The TIME function returns a numeric value between 0 and 0.999988426.

Time Function Examples

Column E of the following spreadsheet shows three examples of the Excel Time function:

Formula:

Result:

Note that the results in column E of the above spreadsheet are formatted with the Time format hh:mm:ss.

Also note that, in cell E4 of the example spreadsheet, the Excel Time function successfully converts the value 73 seconds into the time 1 minute and 13 seconds.

Common Errors

#NUM! – Occurs if the arguments evaluate to a negative time (e.g. if the supplied hour is < 0).
#VALUE! – Occurs if any of the supplied arguments are non-numeric.