Syntax
Scalar
Arguments
Returns
- Type: STRING
- NULL behavior: A NULL DATE returns NULL; month values map to the three-letter English names Jan through Dec.
Properties
Usage notes
- Month names are Jan through Dec.
Documentation Index
Fetch the complete documentation index at: /llms.txt
Use this file to discover all available pages before exploring further.
Returns the three-letter English month name.
monthname(value)
| Name | Type | Required | Description |
|---|---|---|---|
| value | DATE | Yes | Input date within the supported calendar range. TIMESTAMP inputs near time-zone boundaries are outside this form. |
| Property | Value |
|---|---|
| Deterministic | Yes |
| Exact result | Yes |
SELECT monthname(DATE '2024-03-15') AS result;
| result |
|---|
| Mar |
SELECT monthname(DATE '2024-01-01') AS first_month, monthname(DATE '2024-12-31') AS last_month;
| first_month | last_month |
|---|---|
| Jan | Dec |