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