Returns the hour component, as an integer, for the given time value.
- time - The time from which to calculate the hour.
HOUR("14:25:30") returns the hour component, which is 14.
HOUR(C5) returns the hour component of the time value contained in C5.
- Ensure that the input to the function is either a reference to a cell containing a date/time, a function which returns a date/time object, or a date serial number.
- HOUR does not auto-convert number formats. Therefore, HOUR(12:00:00) will return an error.
- Time values are a portion of a date value and represented by a decimal number (for example, 12:00 PM is represented as 0.5 because it is half of a day). HOUR(0.5) returns 50% of 24 hours, i.e. 12.