Home >Database >Mysql Tutorial >How to use the QUARTER function in MySQL

How to use the QUARTER function in MySQL

WBOY
WBOYforward
2023-05-27 18:46:361792browse

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!

Statement:
This article is reproduced at:yisu.com. If there is any infringement, please contact admin@php.cn delete