Requirements Description :
In MySQL, if you want to see the day of the week, you can use the Date_format function, which is documented here.
Operation Process :
1. Use the Date_format function to see if a date is the day of the week
Mysql> SelectDate_format ('2018-06-26','%W');#%W (capital W), check out is the date of the week, the full write in English Tuesday +--------------------------------+|Date_format ('2018-06-26','%W')|+--------------------------------+|Tuesday|+--------------------------------+1Rowinch Set(0.00sec) MySQL> SelectDate_format ('2018-06-26','%a');#%A returns the day of the week in English shorthand, Tue, note:abbreviated=a, short +--------------------------------+|Date_format ('2018-06-26','%a')|+--------------------------------+|Tue|+--------------------------------+1Rowinch Set(0.00sec)
Note : The%a,%w are format strings, and the Date_format function formats the date values according to the format string output.
Document creation time: June 26, 2018 12:35:30
What is the day of the week in MySQL? How do I know if a date is a day of the week?