Loading lesson path
Concept visual
Start at both ends
Return the quarter of the year for the date:
SELECT QUARTER("2017-06-15");The QUARTER() function returns the quarter of the year for a given date value (a number from 1 to 4).
date )
Required. The date or datetime to extract the quarter from
From MySQL 4.0
Return the quarter of the year for the date: SELECT QUARTER("2017-01-01 09:34:21");
Return the quarter of the year for the date:
SELECT QUARTER(CURDATE());❮ MySQL Functions