quarter

description

Syntax

INT quarter(DATETIME date)

Returns the quarter to which the specified date belongs, as an INT

Example

1. mysql> select quarter('2022-09-22 17:00:00');
2. +--------------------------------+
3. | quarter('2022-09-22 17:00:00') |
4. +--------------------------------+
5. |                              3 |
6. +--------------------------------+

keywords

1. quarter