Home  >  Article  >  Database  >  How to use the DAYOFMONTH function in MySQL

How to use the DAYOFMONTH function in MySQL

WBOY
WBOYforward
2023-05-26 10:22:20842browse

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!

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