Home »
MySQL »
MySQL date/time Functions
MySQL DAYNAME() Function
MySQL | DAYNAME() Function: Learn about the DAYNAME() function, how it works, its usages, syntax, and examples.
Submitted by Apurva Mathur, on October 05, 2022
DAYNAME() Function
When you want to find out the name of the day of a particular date, we can use DAYNAME() function. This function gives the day name of any date.
DAYNAME() Syntax
SELECT DAYNAME('date');
DAYNAME() Parameter(s)
- date: It accepts a date for which you have to get the name of the weekday.
DAYNAME() Return Value
As a result, it will return you the day name i.e., the weekday name of a date you have provided.
MySQL DAYNAME() Function Example 1
SELECT DAYNAME('1998-04-12');
MySQL DAYNAME() Function Example 2
SELECT DAYNAME('2021-01-25');
MySQL DAYNAME() Function Example 3
SELECT DAYNAME('2021-01-34');
If the date is not valid then in such case it will return you the NULL.