Excel HOUR() Function
Excel HOUR() Function
The HOUR() function in excel converts a serial number to an hour (0 - 23).
Syntax
HOUR(SERIAL_NUMBER)
Parameter
SERIAL_NUMBER (required)- This parameter represents the date or time from which you want to extract the hour.
Category
Date & Time
Return
This function returns the hour from 0 to 23
Example 1
Objective: Identify today's weekday number basis different return_type value
Col A | Result | Formula |
11/12/2019 22:06 | 22 | =HOUR(A15) |
10:15 AM | 10 | =HOUR(A16) |
11:59 PM | 23 | =HOUR(A17) |
Example 2
Objective: Extract Hour from below given dummy entries
Dummy Entries | Result | Formula |
1-Jan-16 5:37:39 PM | 17 | =HOUR(A15) |
0.46347 | 11 | =HOUR(A16) |
23-Feb-18 | 0 | =HOUR(A17) |
Example 3
Objective: Return current hour value
Result | Formula |
17 | =HOUR(NOW()) |