Quick Navigation
HOUR Function
Summary
The Excel HOUR function extracts the hour component from a time value, returning an integer from 0 (12:00 A.M.) to 23 (11:00 P.M.). Perfect for time analysis and scheduling tasks.
Syntax
HOUR(serial_number)
Parameters
| Parameter | Type | Required | Description |
|---|---|---|---|
| serial_number | Time |
Yes | The time containing the hour you want. Can be text strings in quotes ("6:45 PM"), decimal numbers (0.78125 = 6:45 PM), or other formulas (TIMEVALUE("6:45 PM")) |
Using the HOUR Function
HOUR is invaluable for breaking down time values into components for analysis, reporting, and conditional logic. Use it to categorize work hours, analyze shift patterns, or create time-based alerts.
Common HOUR Examples
Extract Hour from Decimal Time
=HOUR(0.75)
0.75 represents 18 hours (75% of 24-hour day), returns 18
Hour from Date-Time Value
=HOUR("7/18/2011 7:45")
Extracts 7 from full date-time string
Hour from Date Only
=HOUR("4/21/2012")
Dates without time default to 12:00 AM (0 hours), returns 0
Hour from Text Time
=HOUR("6:45 PM")
Directly extracts 18 from PM time string
Frequently Asked Questions
Common Errors and Solutions
#VALUE! error
Cause: serial_number not recognized as valid time
Solution: Ensure input is valid time format, text in quotes, or proper decimal
Notes
- Time values are decimals (12:00 PM = 0.5)
- Use with HOUR, MINUTE, SECOND for complete time breakdown
- Supports TIMEVALUE() for text-to-time conversion
- Available since Excel 2007
Compatibility
Available in: Excel 2007, Excel 2010, Excel 2013, Excel 2016, Excel 2019, Excel 2021, Microsoft 365
Not available in:
Content last reviewed: December 9, 2025
Update frequency: As needed
Excel versions tested: Excel 2007+