Use Excel HOUR Function to get an hour value from a valid time value. In simple words, it will return hour from a time.

For example, from 16:25 it will return 16.

Syntax

HOUR(serial_number)

serial_number A valid time value for which you want to get the hour as a number.

More Information on Excel HOUR Function

You can also input time as a text directly into the function using. For example HOUR(“10:45 PM”).

If refer to a blank cell it will return 0 in the result.

Excel stores date as a number, time represents in the decimals in that number.

HOUR Function always returns an hour in 24-hour format.

Examples

Here I have listed some example for your better understanding about HOUR Function.

1. Use Cell Reference in HOUR Function

In the below example, I have referred to a cell in which I have a valid time value. The function has only extracted hour in 24-Hour format from that time value.

You can use this method where you have time data & you want to extract hour from that values.

2. Use Date as a Reference in HOUR Function

In below example, I have used date which has a time value in it & HOUR Function has extracted the hour as an integer from it.

If you convert that date into an integer by changing its format, you’ll get to know that it has time value as decimals.

3. Use NOW Function with HOUR Function

In the below example, I have used HOUR Function with NOW Function to get dynamic hour integer which will update every time when I recalculate my worksheet or reopen my workbook.

Sample File

What’s Next?

To learn more about Excel HOUR Function you can check Microsoft’s Help Section. And, if you have a unique idea to use it, I would love to hear from you.