Documentation IndexFetch the complete documentation index at: /llms.txtUse this file to discover all available pages before exploring further.
Fetch the complete documentation index at: /llms.txt
Use this file to discover all available pages before exploring further.
返回指定日期中的月份,取值范围 1 到 12。
INT MONTH(DATE|DATETIME date)
date
month('string')
month(3.1415)
1
select month('1987-01-01'); +---------------------+ | month('1987-01-01') | +---------------------+ | 1 | +---------------------+ 1 row in set (0.01 sec)
select month(now()); +--------------+ | month(now()) | +--------------+ | 7 | +--------------+ 1 row in set (0.01 sec)