--一年中除周六日外的日期
select to_char(ta,'yyyymmdd') from (select to_date('20141231','yyyymmdd') + level ta from dual connect by level<367) where to_char(ta,'d') not in (1,7) and ta <to_date('20160101','yyyymmdd')
--获取当天是礼拜几:
select to_char(sysdate,'d') from dual; --礼拜天为1,礼拜一为2,类推
--取当前时间的前十分钟
select sysdate - 10/(60*24) from dual