Skip to content

Latest commit

 

History

History
28 lines (19 loc) · 426 Bytes

File metadata and controls

28 lines (19 loc) · 426 Bytes

hour

description

Syntax

INT HOUR(DATETIME date)

获得日期中的小时的信息,返回值范围从0-23。

参数为Date或者Datetime类型

example

MySQL > select hour('2018-12-31 23:59:59');
+-----------------------------+
| hour('2018-12-31 23:59:59') |
+-----------------------------+
|                          23 |
+-----------------------------+

keyword

HOUR