VeloDB Cloud
SQL Manual
Functions
date-time-functions
quarter

quarter

Description

Syntax:

INT quarter(DATETIME date)

This function calculates the quarter to which the specified date belongs, and returns it an INT.

Example

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

Keywords

quarter