1. 取周一
SELECT SUBDATE(DATE_SUB('20160801',INTERVAL 1 DAY),DATE_FORMAT(DATE_SUB('20160801',INTERVAL 1 DAY),'%w')-1) FROM DUAL
2. 取上月初和上月末
SELECT CONCAT(DATE_FORMAT(DATE_ADD(STR_TO_DATE('20160830','%Y%m%d'),INTERVAL -1 MONTH),'%Y%m'),'01') FROM DUAL -- 上月初 SELECT ATE_FORMAT(LAST_DAY(DATE_ADD(STR_TO_DATE('20160830','%Y%m%d'),INTERVAL -1 MONTH)),'%Y%m%d') FROM DUAL -- 上月末