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

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());