HOUR(time_exp)

Returns the hour based on the hour field in time_exp as an integer value in the range of 0-23.

 

Example:

SELECT HOUR({t '10:00:00'}) returns 10 (ten o'clock is the tenth hour of the day)