ID EN
Date and Time Functions

QUARTER(date)

MySQL 8.4

Returns the quarter of the year for date, in the range 1 to 4, or NULL if date is NULL.

Syntax

MYSQL
SELECT QUARTER('2008-04-01');
2

Examples

Example
MYSQL
SELECT QUARTER('2008-04-01');
2