Curriculum
Course: MYSQL
Login

Curriculum

MYSQL

MySQL References

0/140
Text lesson

DAYNAME

Example

Retrieve the name of the weekday for a given date.

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

Definition and Usage

The DAYNAME() function retrieves the name of the weekday for a specified date.

Syntax

DAYNAME(date)

Parameter Values

Parameter

Description

date

Necessary. Specify the date from which to extract the weekday name.

Technical Details

Works in:

 From MySQL version 4.0

More Examples

Example

Retrieve the weekday name for a given date.

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

Example

Retrieve the weekday name for the current system date.

SELECT DAYNAME(CURDATE());