Finding the Day of the Week for a Date : DAYNAME « Date Time « SQL / MySQL






Finding the Day of the Week for a Date

     
mysql>
mysql> SELECT CURDATE( ), DAYNAME(CURDATE( ));
+------------+---------------------+
| CURDATE( ) | DAYNAME(CURDATE( )) |
+------------+---------------------+
| 2011-10-03 | Monday              |
+------------+---------------------+
1 row in set (0.00 sec)

   
    
    
    
    
  








Related examples in the same category

1.Return the name of the day: DAYNAME()
2.Treating date-and-time as Numbers
3.DAYNAME( ) is useful in conjunction with other date-related techniques.
4.DAYNAME( ) returns the complete day name.
5.Get the name of the day
6.DayName returns Monday, Tuesday ...
7.Use DAYNAME( ) to display weekday names instead.