日期:2014-05-16  浏览次数:20357 次

获取当前日期对应是星期几

Select TO_CHAR (t.d, 'YYYY-MM-DD') as sdate,TO_CHAR (t.d, 'day') as Weeks
? FROM (Select (TRUNC (sysdate, 'WW') + ROWNUM -1) d
????????? FROM dual
???????? Where ROWNUM < 7) t
Where TO_CHAR (t.d, 'WW') = TO_CHAR (sysdate, 'WW') order by sdate