Basic Description

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

Syntax: HOUR( serial_number )

where the serial_number argument is the time from which you want to extract the hour component. This can be supplied to the function either directly (as a text representation of a time or as a decimal value), as a reference to a cell containing a time, or as a time value returned from another function or formula. 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

The following spreadsheet shows the Excel Hour function applied to several different supplied times.

1 =HOUR(“13:00:55”)
2 =HOUR(“1:00 PM”)
3 13:00:55 =HOUR( A3 )
4 08:32:55 =HOUR( A4 )
5 29:11:22 =HOUR( A5 )
6 12/09/2011 08:55 =HOUR( A6 )
1 13
2 13
3 13:00:55 13
4 08:32:55 8
5 29:11:22 5
6 12/09/2011 08:55 8

Note that, in the above spreadsheet, the time shown in cell A4 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 A5 is ignored, and the hour function simply returns the hour value 8.



Hour Function Error

If you get an error from the Excel Hour Function, this is likely to be the #VALUE! error occurs if the supplied serial_number is not a valid Excel time.


Download Documents

Download Excel File

Leave a Reply

Your email address will not be published. Required fields are marked *

You may use these HTML tags and attributes: <a href="" title=""> <abbr title=""> <acronym title=""> <b> <blockquote cite=""> <cite> <code> <del datetime=""> <em> <i> <q cite=""> <s> <strike> <strong>



clearPost Comment