- Categories:
MONTHNAME¶
Returns the three-letter month name for the specified date or timestamp.
Syntax¶
Arguments¶
date_or_timestamp_exprA date or a timestamp, or an expression that can be evaluated to a date or a timestamp.
Returns¶
This function returns a value of type VARCHAR.
Usage notes¶
To return the full month name instead of the three-letter month name, you can use the
TO_CHAR function with the TO_DATE or TO_TIMESTAMP
function. The following example uses the TO_CHAR and TO_DATE functions to return the full month name for
the date 2025-01-01:
Examples¶
The following examples use the MONTHNAME function.
Return the three-letter month name of a date:
Return the three-letter month name of a timestamp:
Return the three-letter month name of DATE values in a column.
First, create a table with a DATE column and insert various DATE values:
Use the MONTHNAME function in a query to return the three-letter month name of each
value in the d column: