1>查当前是星期几?
select to_char(sysdate,'Day') from dual;
result-->Wednesday
select to_char(sysdate,'DAY') from dual;
result-->WEDNESDAY
2>查当前月最后一天的日期;
select LAST_DAY(trunc(sysdate,'MONTH')) from dual
result-->2009-10-31
3>查当前是哪一周?
SELECT TO_CHAR(SYSDATE, 'WW') W_DATE FROM DUAL
result-->48
阅读(1002) | 评论(0) | 转发(0) |