Skip to content

DAYNAME

  • date: This parameter refers to the date from which the day of the week is to be extracted. It accepts a value of the DATE, DATETIME, or TIMESTAMP type. DAYNAME(date) returns a string representing the day of the week for the provided date.
SELECT DAYNAME('2023-12-25') AS 'Day';
+-------+
| Day |
+-------+
| Monday|
+-------+

The DAYNAME function in SQL returns the day of the week for a specified date. In this example, the function is used to determine the day of the week for December 25, 2023, which returns ‘Monday’.