跳到主要内容

QUARTER

quarter

description

Syntax

INT quarter(DATETIME date)

返回指定的日期所属季度,以INT类型返回

Example

mysql> select quarter('2022-09-22 17:00:00');
+--------------------------------+
| quarter('2022-09-22 17:00:00') |
+--------------------------------+
| 3 |
+--------------------------------+

keywords

quarter