SQL Function Reference

HOUR
Returns the hour value (between 0 and 23) for the time
MySQL
HOUR(datetime)
Examples
MySQL
SELECT HOUR('2022-06-16 16:37:03');