Excel Functions

How to Use Excel HOUR Function?

HOUR function is used to return the hour as a number between 0 and 23 from a given time.

Excel HOUR Function
Excel HOUR Function

HOUR Function: A Brief

The HOUR function in Excel extracts the hour from a given time and returns a number between 0 and 23. For example, if the time is 10:30 AM, the HOUR function will return 10. You can use this function to return the hour value in a cell.

ObjectiveValue Returned by function
Aim to get the Hour value as NumberHOUR Function will return a numeric values from the input hour value.

HOUR Function: A Syntax:

=HOUR(hour_value)
  1. hour_value: It should be a valid excel hour value.

Important Notes About HOUR Function:

  • The HOUR function in Excel extracts the hour value from a given time and returns a number between 0 and 23.
    • For Example, if the time is 11:00 AM, the HOUR function will return the numeric value as 11. It requires only one argument, serial_number, which must be a valid Excel date or Excel time.
Basic Example of using HOUR Function in Excel
  • You can enter time values as text (e.g., “9:25 PM”) or as decimal numbers (e.g., 0.5, which equals 12:00 PM). The HOUR Function returns the equivalent numeric value.
HOUR Function returns the numeric value by ignoring the minutes from the given Hour value
HOUR Function returns the numeric value by ignoring the minutes from the given Hour value
HOUR Function returns the numeric value equivalent to the decimal value.
HOUR Function returns the numeric value equivalent to the decimal value.
  • In the above image, The input value is 0.34 decimal value but the HOUR Function converts into a valid Excel time and returns the numeric value equivalent to the input hour value. So the HOUR function considers the decimal value as 08:09 AM and returns the numeric value as 8 in the output cell.
Decimal ValuesEquivalent Hour Value in Excel
0.0012:00 AM (Midnight)
0.0112:14 AM
0.0212:29 AM
0.0312:43 AM
0.0412:57 AM
0.051:12 AM
0.061:26 AM
0.071:41 AM
0.081:55 AM
0.092:10 AM
0.102:24 AM
0.1253:00 AM
0.153:36 AM
0.16674:00 AM
0.204:48 AM
0.256:00 AM
0.307:12 AM
0.33338:00 AM
0.3759:00 AM
0.409:36 AM
0.5012:00 PM (Noon)
0.551:12 PM
0.58332:00 PM
0.602:24 PM
0.6253:00 PM
0.66674:00 PM
0.704:48 PM
0.756:00 PM
0.807:12 PM
0.83338:00 PM
0.8759:00 PM
0.909:36 PM
0.916710:00 PM
0.9511:24 PM
1.0012:00 AM (Midnight)

From the above table, you can find the decimal values and equivalent hour values. The Decimal value should be lies between 0 to 1.

Example 1: Basic Example:

The below example will make you understand the HOUR Function easily.

Input TimeFormula UsedFinal ResultComments
10:45 AM=HOUR(B3)10Returns 10 because the hour part is 10
5:30 PM=HOUR(B4)17Returns 17 because 5 PM is represented as 17 in a 24-hour format
00:15=HOUR(B5)0Returns 0, indicating midnight
23:59=HOUR(B6)23Returns 23, indicating 11:59 PM
12:00 PM=HOUR(B7)12Returns 12, as noon is the 12th hour of the day
Basic Example usage of HOUR Function with different Hour values.
Basic Example usage of HOUR Function with different Hour values.

Example 2: Return Hour Values from Date & Time Values:

If you sheet contains both date and time values in the cells, you can use the HOUR function to extract the numeric values by ignoring the date values from the input cell.

Input Date and TimeFormula UsedFinal ResultComments
03-08-2025 10:30=HOUR(B3)10Returns 10 because the time is 10:30 AM.
25-12-2024 00:01=HOUR(B4)0Returns 0, as midnight is hour 0.
Example usage of HOUR function ignores, Dates and Minutes from given input values.
Example usage of HOUR function ignores, Dates and Minutes from given input values.

Notes:

  • If the hour_value is not recognised by HOUR function then it will returns the #VALUE! error.
  • If the hour_value is out of given range and then the HOUR function will returns the #NUM! error.

That’s it.

Narendhiran Vijayakumar.

Feel free to comment us below, if you have any queries about the above topic and find more interesting excel tutorials on our homepage: Excel24x7.com.

References:

Narendhiran Vijayakumar

Hello~ I'm Narendhiran Vijayakumar, a dedicated web developer with strong skills in both frontend frameworks and backend development with PHP. I enjoy creating websites that are user-friendly & user-interactive. I've successfully created and launched several platforms, including Klickaud.org, Forhub.io, and IMGCentury.com.
Back to top button