HOUR() function returns hour from a time

Example

SELECT HOUR( '12:01:34')

Returns

12