DAYOFWEEK(date)
SELECT DAYOFWEEK(‘2016-01-16') SELECT DAYOFWEEK(‘2016-01-16 00:00:00')
-> 7 (表示返回日期date是星期几,记住:星期天=1,星期一=2, ... 星期六=7)
The above is the detailed content of How to use DAYOFWEEK in MySQL. For more information, please follow other related articles on the PHP Chinese website!