MariaDB: MONTHNAME Function
This MariaDB tutorial explains how to use the MariaDB MONTHNAME function with syntax and examples.
Description
The MariaDB MONTHNAME function returns the full name of the month for a date.
Syntax
The syntax for the MONTHNAME function in MariaDB is:
MONTHNAME( date_value )
Parameters or Arguments
- date_value
- A date or datetime value from which to extract the month name.
Note
- The MONTHNAME function returns the full name of the month (January, February, ... December) given a date value.
Applies To
The MONTHNAME function can be used in the following versions of MariaDB:
- MariaDB 10
Example
Let's look at some MariaDB MONTHNAME function examples and explore how to use the MONTHNAME function in MariaDB.
For example:
SELECT MONTHNAME('2014-05-26'); Result: 'May' SELECT MONTHNAME('2014-06-01'); Result: 'June' SELECT MONTHNAME('2014-12-23'); Result: 'December'
This last MONTHNAME example would display the month name for the current system date (current system date is returned by the CURDATE function).
SELECT MONTHNAME(CURDATE());
Advertisements