QUARTER
quarterβ
descriptionβ
Syntaxβ
INT quarter(DATETIME date)
Returns the quarter to which the specified date belongs, as an INT
Exampleβ
mysql> select quarter('2022-09-22 17:00:00');
+--------------------------------+
| quarter('2022-09-22 17:00:00') |
+--------------------------------+
| 3 |
+--------------------------------+
keywordsβ
quarter