QUARTER
Return the quarter of the year. This function returns a number from 1 to 4 indicating the quarter for a given date.
Syntax
QUARTER(date)Description
Examples
SELECT QUARTER('2008-04-01');
+-----------------------+
| QUARTER('2008-04-01') |
+-----------------------+
| 2 |
+-----------------------+
SELECT QUARTER('2019-00-01');
+-----------------------+
| QUARTER('2019-00-01') |
+-----------------------+
| 0 |
+-----------------------+Last updated
Was this helpful?

