Excel HOUR Function
In this Article
This Excel Tutorial demonstrates how to use the Excel HOUR Function in Excel to get the hour of time, with formula examples.
HOUR Function Description:
The HOUR Function Returns the hour as a number (0-23).
|Date + Time||=HOUR(C7)||4|
Syntax and Arguments:
The Syntax for the HOUR Formula is:
Function Arguments ( Inputs ):
serial_number – The time, represented as a fraction of the day or entered as time surrounded by quotations (“s”). Example: You can not enter 8:00:00 pm directly into the cell. Instead you would need to use the corresponding fraction of the day: .3333 or the time surrounded by quorations: “8:00:00 pm”. Alternatively, you can reference a cell with the time entered. Excel automatically converts times stored in cells into a fractional number (unless the time is stored as text).
Use the HOUR Function to get the hour from a time.
Enter any time or time serial number.
HOUR Examples in VBA
You can also use the HOUR function in VBA. Type:
For the function arguments (serial_number, etc.), you can either enter them directly into the function, or define variables to use instead.
Return to the List of all Functions in Excel
How to use the HOUR Function in Excel:
To use the AND Excel Worksheet Function, type the following into a cell:
After entering it in the cell, notice how the AND formula inputs appear below the cell:
You will need to enter these inputs into the function. The function inputs are covered in more detail in the next section. However, if you ever need more help with the function, after typing “=HOUR(” into a cell, without leaving the cell, use the shortcut CTRL + A (A for Arguments) to open the “Insert Function Dialog Box” for detailed instructions:
For more information about the HOUR Formula visit the