TIME

Function Reference: TIME

Syntax
=TIME(hour,minute,second)
Purpose / Description
Returns a serial time number representing the time of day, based on the hour, minute and second arguments.
Arguments
Name Type Description
hour number A constant, reference or nested expression that returns the hour to be used in the calculation. May be a value between 0 and 23.  If the value >23, the value is reduced in multiples of 24 until it is a value between 0 and 23 inclusively. The value is truncated to an integer, no decimal part is supported.
minute number A constant, reference or nested expression that returns the minute to be used in the calculation. If the value is <=0, the hour represented by the serial time number returned is adjusted back in time from the given hour.  If the value >59, the hour represented by the serial time number returned is adjusted forward in time from the given hour, however, the hour will be adjusted back as described above if this results in the hour being > 23.  The value is truncated to an integer, no decimal part is supported.
second number A constant, reference or nested expression that returns the second to be used in the calculation. If the value is <=0, the minute (and ultimately, if necessary, the hour) represented by the serial time number returned is adjusted back in time from the given minute and hour. If the value >59, the minute (and ultimately, if necessary, the hour) represented by the serial time number returned is adjusted forward in time from the given minute and hour.  The value is truncated to an integer, no decimal part is supported.
Return Values
Type Specific Value Description
number   The serial time number of the time calculated from the inputs hour, minute and second, adjusted backwards or forwards as required where the hour, minute or second arguments are out of the expected range.
The values returned will be in the range 0 to 0.9999884, representing time values from 00:00:00 through 23:59:59.
error #VALUE! If any of the arguments are not numbers and cannot be coerced to numbers.
error #NUM! If the serial time number derived is <0.
error   Any errors referenced by arguments are returned due to propagation of error values.
Notes / Comments / Advice / Warnings
Note: Although split times (up to 2 decimals of a second can be stored and formatted in Excel, the TIME function does not do those calculations, they must be entered manually or using alternative formulas.
Note:: Although time values of more than 24 hours can be stored in Excel, the TIME function will not calculate a serial time value greater than .9999884 (representing 23:59:59).  Instead it will decrement the value in multiples of 24 hours, until it is a value in the range 00:00:00 to 23:59:59.
Examples: Open / download sample workbook: TIME.xlsx