oracle 取周
select to_char(to_date('20090108','YYMMDD'),'IW') from dual ;
select to_char(to_date('20090108','YYMMDD'),'WW') from dual ;
select to_char(to_date('20090107','YYMMDD'),'IW') from dual ;
select to_char(to_date('20090107','YYMMDD'),'WW') from dual ;
IW:Week of year (1-52 or 1-53) based on the ISO standard.
WW:Week of year (1-53) where week 1 starts on the first day of the year and continues to the seventh day of the year.
参考资料 http://www.techonthenet.com/oracle/functions/to_date.php