Product Solutions Support
Try MemSQL

HOUR

Extracts the hour of the day from the given datetime, zero-indexed. Midnight is 0, 11PM is 23.

HOUR ( dateobj )

Arguments

Return Type

Integer

Examples

memsql> select hour('2009-02-13 23:31:30');
+-----------------------------+
| hour('2009-02-13 23:31:30') |
+-----------------------------+
|                          23 |
+-----------------------------+
Was this article useful?