MySQL查询本周、上周、本月、上个月份数据的sql代码
摘要:
查询当前这周的数据 SELECT name,submittime FROM enterprise WHERE YEARWEEK(date_format(submittime,'%Y-%m-%d')) = YEARWEEK(now()); 查询上周的数据 SELECT name,submittime 阅读全文
posted @ 2016-08-09 17:46 826 阅读(339) 评论(0) 推荐(0) 编辑