DAYOFWEEK() Function in MySQL Last Updated : 03 Dec, 2020 Comments Improve Suggest changes Like Article Like Report DAYOFWEEK() function : This function in MySQL is used to return the weekday index for a specified date (a number from 1 to 7). Note : 1=Sunday, 2=Monday, 3=Tuesday, 4=Wednesday, 5=Thursday, 6=Friday, 7=Saturday. Syntax : DAYOFWEEK(date) Parameter : This method accepts a parameter which is illustrated below : date - Specified date to return the weekday index from. Returns : It returns the weekday index for a specified date (a number from 1 to 7). Example-1 : Getting the weekday index for a specified date "2020-11-24". SELECT DAYOFWEEK("2020-11-24"); Output : 3 Example-2 : Getting the weekday index for a specified date "2020-11-22 07:12:23". SELECT DAYOFWEEK("2020-11-22 07:12:23"); Output : 1 Example-3 : Getting the weekday index for the current system date. SELECT DAYOFWEEK(CURDATE()); Output : 3 Application : This function is used to return the weekday index for a specified date (a number from 1 to 7). Comment More infoAdvertise with us Next Article DAYOFWEEK() Function in MySQL K Kanchan_Ray Follow Improve Article Tags : SQL DBMS-SQL mysql Similar Reads Use of DAYOFWEEK() function in MySQL DAYOFWEEK() : This function in MySQL helps to return weekday numbers/index from the given date(a number from 1 to 7). The weekday index returned by DAYOFWEEK() function follows ODBC standards. Note - Following are the weekday numbers. Sunday Monday Tuesday Wednesday Thursday Friday Saturday Syntax : 1 min read DAYOFYEAR() Function in MySQL DAYOFYEAR() function: This function in MySQL is used to return the day of the year for a specified date (a number from 1 to 366). Syntax : DAYOFYEAR(date) Parameter : This method accepts a parameter which is illustrated below: date: Specified date to return the day of the year from Returns : It retu 1 min read DAY() Function in MySQL DAY() function : This function in MySQL is used to return the day of the month for a specified date (a number from 1 to 31). This function equals the DAYOFMONTH() function. Syntax : DAY(date) Parameter : This method accepts a parameter which is illustrated below : date : Specified date to extract th 1 min read DAYNAME() Function in MySQL 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 1 min read DAYOFMONTH() Function in MySQL DAYOFMONTH() function : This function in MySQL is used to return the day of the month for a specified date (a number from 1 to 31). This function equals the DAY() function. Syntax : DAYOFMONTH(date) Parameter : This method accepts a parameter which is illustrated below as follows. date - Specified d 1 min read Like