hour

description

Syntax

INT HOUR(DATETIME date)

Returns hour information in the time type, ranging from 0,23

The parameter is Date or Datetime type

example

1. mysql> select hour('2018-12-31 23:59:59');
2. +-----------------------------+
3. | hour('2018-12-31 23:59:59') |
4. +-----------------------------+
5. |                          23 |
6. +-----------------------------+

keyword

HOUR