Open In App

DAYNAME() Function in MySQL

Last Updated : 27 Nov, 2020
Comments
Improve
Suggest changes
Like Article
Like
Report
DAYNAME() function : This function in MySQL is used to return the weekday name for a specified date. Syntax :
DAYNAME(date)
Parameter : This method accepts a parameter which is illustrated below as follows.
  • date - Specified date to extract the weekday name from
Returns : It returns the weekday name for a specified date. Example-1 : Getting the weekday name for a specified date. "2020-11-24".
SELECT DAYNAME("2020-11-24");  
Output :
Tuesday
Example-2 : Getting the weekday name from a specified date "2020-11-22 07:12:23".
SELECT DAYNAME("2020-11-22 07:12:23");  
Output :
Sunday
Example-3 : Getting the weekday name for the current system date.
SELECT DAYNAME(CURDATE());
Output :
Tuesday
Application : This function is used to return the weekday name for a specified date.

Next Article
Article Tags :

Similar Reads