HOUR

Sintassi

HOUR(orario)

Spiegazione

Restituisce l'ora corrispondente all'orario specificato. L'intervallo dei possibili valori restituiti va da 0 a 23, per gli orari che si riferiscono a un giorno. Tuttavia, l'intervallo del tipo TIME è effettivamente molto più grande, pertanto HOUR può restituisce valori molto più elevati di 23.

Esempi

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

MariaDB [(none)]> SELECT HOUR('272:59:59');
+-------------------+
| HOUR('272:59:59') |
+-------------------+
|               272 |
+-------------------+
1 row in set (0.00 sec)

MariaDB [(none)]> 

Commenti

Sto caricando i commenti......
Content reproduced on this site is the property of its respective owners, and this content is not reviewed in advance by MariaDB. The views, information and opinions expressed by this content do not necessarily represent those of MariaDB or any other party.