
| Function Category | Date and Time |
| Volatility | Non-volatile |
| Related Functions | MINUTE — extracts the minute portion SECOND — extracts seconds TIME — assembles a time value from hours, minutes and seconds |
What Does the HOUR Function Do?
The HOUR function is used to extract the hour number from a time or date value. It returns an integer from 0 to 23, corresponding to the hour in 24-hour format.
Syntax
=HOUR(time)The time argument can be a reference to a cell with a date/time, the result of another function, or a string value recognized as time (e.g., “13:45”).
Examples
Extract the hour from time in cell A1:
=HOUR(A1)If A1 contains 18:30, the formula returns 18.
Extract the hour from date and time:
=HOUR(NOW())The formula returns the current hour at the time of calculation.
Features
- The function works with both pure time and full dates.
- If the value doesn’t contain time, the result will be 0.
- For proper operation, the cell must be recognized as time or date.
Related Functions
- MINUTE — extracts the minute portion
- SECOND — extracts seconds
- TIME — assembles a time value from hours, minutes and seconds
Other Date and Time Functions in Excel
TIMEVALUE, TIME, YEAR, DATE, DATEVALUE, EDATE, DAY, WEEKDAY, YEARFRAC, EOMONTH, MONTH, MINUTE, WEEKNUM, WORKDAY, DATEDIF, TODAY, SECOND, NOW, NETWORKDAYS
Like the article? Help its author! Buy !SEMTools, it has lots of useful instruments to process text data.
This post is also available in RU.