> ## Documentation Index
> Fetch the complete documentation index at: /documents/llms.txt
> Use this file to discover all available pages before exploring further.

# monthname

> 返回指定日期对应的月份名称。

返回指定日期对应的月份。参数为 DATE 或 DATETIME 类型。

如果日期不存在，返回 NULL。

## 语法

```Haskell theme={null}
VARCHAR MONTHNAME(DATETIME|DATE date)
```

## 示例

```Plain Text theme={null}
select monthname('2008-02-03 00:00:00');
+----------------------------------+
| monthname('2008-02-03 00:00:00') |
+----------------------------------+
| February                         |
+----------------------------------+

select monthname('2008-02-03');
+-------------------------+
| monthname('2008-02-03') |
+-------------------------+
| February                |
+-------------------------+
```


This documentation is built and hosted on [Mintlify](https://mintlify.com), a developer documentation platform.