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


MySQL TUTORIALS » Date Time Functions » HOUR »

 

HOUR(time) returns the hour for time.


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 |
+------------------+
row in set (0.00 sec)

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



Leave a Comment / Note


 
Verification is used to prevent unwanted posts (spam). .

Follow Navioo On Twitter

MySQL TUTORIALS

 Navioo Date Time Functions
» HOUR