HOUR
Extract the hour. This function returns the hour portion of a time or datetime value as a number from 0 to 23.
Syntax
HOUR(time)Description
Examples
SELECT HOUR('10:05:03');
+------------------+
| HOUR('10:05:03') |
+------------------+
| 10 |
+------------------+
SELECT HOUR('272:59:59');
+-------------------+
| HOUR('272:59:59') |
+-------------------+
| 272 |
+-------------------+See Also
Last updated
Was this helpful?

