Curriculum
Course: MYSQL
Login

Curriculum

MYSQL

MySQL References

0/140
Text lesson

MONTHNAME

Example

Retrieve the name of the month corresponding to a given date.

SELECT MONTHNAME(“2017-06-15”);

Definition and Usage

The MONTHNAME() function retrieves the name of the month based on a provided date.

Syntax

MONTHNAME(date)

Parameter Values

Parameter

Description

date

Mandatory: The date or datetime value from which to retrieve the month name.

Technical Details

Works in:

 From MySQL version 4.0

More Examples

Example

SELECT MONTHNAME(“2017-06-15 09:34:21”);

Example

Retrieve the name of the month for the current system date.

SELECT MONTHNAME(CURDATE());