The Excel HOUR Function

Function Description

The Excel HOUR function returns an integer representing the hour component of a supplied Excel time.

The syntax of the function is:

HOUR( serial_number )

where the serial_number argument is the time from which you want to extract the hour component. This may be entered to the function as either:

Note that, if the serial_number argument contains a date and time, the Hour function ignores the date part of the argument.

Hour Function Examples

In column B of the following spreadsheet, the Excel Hour function is used to extract the hour from several different supplied times.

1 =HOUR("13:00:55")
2 =HOUR("1:00 PM")
313:00:55=HOUR( A3 )
408:32:55=HOUR( A4 )
529:11:22=HOUR( A5 )
612/09/2015 08:55=HOUR( A6 )
1 13
2 13
612/09/2015 08:558

Note that, in the above spreadsheet, the time shown in cell A5 is actually a whole day plus the time 05:11:22. Therefore, when supplied with this value, the Hour function ignores the full day and simply returns the hour value 5.

Similarly, the date part of the value in cell A6 is ignored, and the hour function simply returns the hour value 8.

For further information and examples of the Excel Hour function, see the Microsoft Office website.

Hour Function Error

If you get an error from the Excel Hour Function, this is likely to be the #VALUE! error:

Common Error
#VALUE!-Occurs if the supplied serial_number is not a valid Excel time.