select sysdate from dual;
select to_char(sysdate,’MM’) pdate from dual;
select to_char(sysdate,’MM-DD’) pdate from dual;
select to_char(sysdate,’MM-DD-YYYY’) pdate from dual;
select to_char(sysdate,’MM-DD-YYYY HH24′) pdate from dual;
select to_char(sysdate,’MM-DD-YYYY HH24:MI’) pdate from dual;
select to_char(sysdate,’MM-DD-YYYY HH24:MI:SS’) pdate from dual;
select CURRENT_DATE from dual;
select to_char(CURRENT_DATE,’MM’) pdate from dual;
select to_char(CURRENT_DATE,’MM-DD’) pdate from dual;
select to_char(CURRENT_DATE,’MM-DD-YYYY’) pdate from dual;
select to_char(CURRENT_DATE,’MM-DD-YYYY HH24′) pdate from dual;
select to_char(CURRENT_DATE,’MM-DD-YYYY HH24:MI’) pdate from dual;
select to_char(CURRENT_DATE,’MM-DD-YYYY HH24:MI:SS’) pdate from dual;
SELECT LAST_DAY(SYSDATE) “Last” from dual;
SELECT to_char(LAST_DAY(SYSDATE),’DD’) “Last Day” from dual;
SELECT NEXT_DAY(’13-JUL-2013′,’FRIDAY’) “NEXT DAY” FROM DUAL;
select next_day(to_char(sysdate,’DD-MON-YYYY’),’FRIDAY’) from dual;
select ADD_MONTHS(sysdate,1) from dual;
select ADD_MONTHS(sysdate,-1) from dual;
select months_between (to_date(’15-JUL-2013′,’DD MON YYYY’),to_date(’23-NOV-1981′,’DD MON YYYY’)) timed from dual
SELECT TRUNC(TO_DATE(’13-JUL-13 10:29:21′,’DD-MON-YY HH24:MI:SS’))
“date” FROM DUAL;
SELECT ROUND (TO_DATE (’01-JUN-00′),’YEAR’) “New Year” FROM DUAL;

Suggested Posts:

Leave a Reply