查询本周所有的数据(本周第一天是周一)
SELECT * FROM task WHERE YEARWEEK(date_format(时间字段,'%Y-%m-%d'),1) = YEARWEEK(now(),1);
查询本周所有的数据(本周第一天是周日)
SELECT * FROM task WHERE YEARWEEK(date_format(时间字段,'%Y-%m-%d')) = YEARWEEK(now());
查询本周所有的数据(本周第一天是周一)
SELECT * FROM task WHERE YEARWEEK(date_format(时间字段,'%Y-%m-%d'),1) = YEARWEEK(now(),1);
查询本周所有的数据(本周第一天是周日)
SELECT * FROM task WHERE YEARWEEK(date_format(时间字段,'%Y-%m-%d')) = YEARWEEK(now());