The Excel TIME Function

Related Function:
DATE function

Basic Description

The Excel Time function accepts three integer arguments representing hours, minutes and seconds, and returns an Excel time.

The syntax of the function is:

TIME( hour, minute, second )

where the hour, minute and second arguments are integer values that can be supplied to the function either directly, as values returned from other formulas, or as references to cells containing integers.

If any of the Time function arguments are supplied as decimals, these are truncated to integers. Note also that, if the hour value is greater than 23, this value is divided by 24 and the remainder is used as the hour (for example, if you supply the function with the value 25 as the hour argument, the value 1 is used).

Like all Excel times, the time returned from the Excel Time function is stored, within Excel, as a decimal (see the page on Excel Dates & Times for further information on this). Therefore, if you want the result of the function to be displayed as a time, you will need to make sure that the cell containing the function is formatted with an Excel 'Time' format.


Time Function Examples

The following spreadsheet shows several examples of the Time function. The formulas are shown in the spreadsheet on the left and the results are shown in the spreadsheet on the right:

 Formulas:
  A B C D E
1 Hrs Mins Secs   Time
2         =TIME( 5, 44, 32 )
3         =TIME( 2+3, 44, 32 )
4 5 21 55   =TIME( A4, B4, C4 )
5 0 0 73   =TIME( A5, B5, C5 )
 Results:
  A B C D E
1 Hrs Mins Secs   Time
2         05:44:32
3         05:44:32
4 5 21 55   05:21:55
5 0 0 73   00:01:13

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

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

More details and examples of the Excel Time function are provided on the Microsoft Office website.

Return to the Excel Date and Time Functions Page

Return to the List of All Built-In Excel Functions

Valid XHTML 1.0 Transitional Valid CSS!
Disclaimer   Privacy Policy
Copyright © 2008-2014 ExcelFunctions.net