获得指定日期所在的周,周一日期
方法一
select CASE to_number(to_char(to_date('2011-09-20','yyyy-MM-dd'),'D')) WHEN 7 THEN to_date('2011-09-20','yyyy-MM-dd')-5 WHEN 6 THEN to_date('2011-09-20','yyyy-MM-dd')-4 WHEN 5 THEN to_date('2011-09-20','yyyy-MM-dd')-3 WHEN 4 THEN to_date('2011-09-20','yyyy-MM-dd')-2 WHEN 3 THEN to_date('2011-09-20','yyyy-MM-dd')-1 WHEN 2 THEN to_date('2011-09-20','yyyy-MM-dd') ELSE to_date('2011-09-20','yyyy-MM-dd')-6 END AS curmon FROM dual;方法二
select to_char(next_day(to_date('20110904','yyyymmdd')-7*(0+1),'星期一'),'yyyymmdd') Result from dual;