扫码一下
查看教程更方便
dayofmonth()函数 返回日期的月份中的第几天,范围为 1 到 31。
dayofmonth()函数语法如下
dayofmonth(date)
返回日期的月份中的第几天,范围为 1 到 31。
mysql> select dayofmonth('1998-02-03');
---------------------------------------------------------
| dayofmonth('1998-02-03') |
---------------------------------------------------------
| 3 |
---------------------------------------------------------
1 row in set (0.00 sec)