Mega Code Archive

 
Categories / MySQL Tutorial / Date Time Functions
 

QUARTER(date) returns the quarter of the year for date, in the range 1 to 4

mysql> mysql> SELECT QUARTER('99-04-01'); +---------------------+ | QUARTER('99-04-01') | +---------------------+ |                   2 | +---------------------+ 1 row in set (0.00 sec) mysql>