mysql 时间查询
查询上周
select * from wr_workorder_info where recorddt>=date_add(date_format(now(),'%Y-%m-%d'),interval -(7 + weekday(now())) day)
and recorddt< date_add(now(),interval -(0 + weekday(now())) day);
查询前两周
select * from wr_workorder_info where recorddt>=date_add(date_format(now(),'%Y-%m-%d'),interval -(14 + weekday(now())) day)
and recorddt< date_add(now(),interval -(0 + weekday(now())) day);