QUARTER(date)
SELECT QUARTER(‘2016-01-16') SELECT QUARTER(‘2016-01-16 00:00:00')
-> 1 (表示返回date的是当年的第几个季度,返回1,2,3,4)
The above is the detailed content of How to use the QUARTER function in MySQL. For more information, please follow other related articles on the PHP Chinese website!