The HOUR function returns an integer (0-23) representing the hour component of a supplied Excel time.




Argument Description
serial_number A valid time from which you want to extract the hour component.
  • Times can be supplied as text (e.g. “7:45 PM”) or as decimal numbers (e.g. 0.5, which equals 12:00 PM).
  • If the serial_number argument contains a date and time, the HOUR function ignores the date part of the argument.


  A B C D
1 Time Formula Result Notes
2 12:00 PM =HOUR(A2) 12  
3 12:30 PM =HOUR(A3) 12 Minutes are ignored
4 7/10/2015 6:00 PM =HOUR(A4) 18 Dates are ignored
5 7:45 PM =HOUR(A5) 19 Valid time entered as text

Common Function Error(s)

Problem What went wrong
#VALUE! Occurs if the supplied serial_number is not a valid time