Home >Database >Mysql Tutorial >How to use the MONTH function in MySQL
MONTH(date)
SELECT MONTH(‘2016-01-16') SELECT MONTH(‘2016-01-16 00:00:00')
-> 1 (表示返回date是当年的第几月,1月就返回1,... ,12月就返回12)
The above is the detailed content of How to use the MONTH function in MySQL. For more information, please follow other related articles on the PHP Chinese website!