HOUR function

Excel HOUR Function returns the hour portion of a time value. It’s a simple function that can be useful in various scenarios, like tracking working hours or analyzing time-related data.




serial_numberThe time value from which you want to extract the hour.

How to Use

The HOUR function is straightforward to use. You provide a time value as the argument, and it returns the hour as an integer. Here’s how you can use it with some examples:

Let’s assume you have a time value in cell A1, which is 3:45 PM (15:45 in 24-hour format). To extract the hour, you can use the following formula:

This formula will return 15 since 3:45 PM corresponds to the 15th hour of the day.

Here are a few more examples:

This formula returns 8 because it’s 8:30 in the morning.

This formula returns 22 as it’s 10:15 PM in the 24-hour format.

If you want to extract the hour from a specific time within a date and time value, you can do so as well:

This formula extracts the hour from the given date and time, resulting in 14.

Additional Information

The HOUR function can be particularly useful when working with datasets that involve time tracking, scheduling, or other time-related analysis. It helps you isolate the hour component of a time value, making it easier to perform calculations or create visualizations based on time data.

Tomasz Decker is an Excel specialist, skilled in data analysis and financial modeling.