HOUR(time) returns the hour for time. : HOUR « Date Time Functions « MySQL Tutorial






The range of the return value is 0 to 23.

The range of TIME values could be much larger.

mysql>
mysql> SELECT HOUR('10:05:03');
+------------------+
| HOUR('10:05:03') |
+------------------+
|               10 |
+------------------+
1 row in set (0.00 sec)

mysql>
mysql> SELECT HOUR('272:59:59');
+-------------------+
| HOUR('272:59:59') |
+-------------------+
|               272 |
+-------------------+
1 row in set (0.00 sec)








14.21.HOUR
14.21.1.HOUR(time) returns the hour for time.