Use
HOUR function is used to extract an hour component between 0 (12:00 A.M.) to 23 (11:00 P.M.), from a given time. For example, from a time of 3:30 AM, you may extract an hour of 3 in a cell.
Syntax
HOUR(serial_number)
serial_number is a time format in Excel from which you want to extract an hour.
Example
Formula:
Results: