dayofmonth (日)
Obtains the day part in a date and returns a value that ranges from 1 to 31.(获取日期中的日部分,并返回1到31之间的值。)
The date
parameter must be of the DATE or DATETIME type.(date 参数必须是 DATE 或 DATETIME 类型。)
语法
INT DAYOFMONTH(DATETIME date)
示例
MySQL > select dayofmonth('1987-01-31');
+-----------------------------------+
| dayofmonth('1987-01-31 00:00:00') |
+-----------------------------------+
| 31 |
+-----------------------------------+
关键词
DAYOFMONTH