Curriculum
Course: SQL
Login

Curriculum

SQL

SQL References

0/80

MySQL Functions

0/139

SQL Server Functions

0/84

SQL Quick Ref

0/1
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());