SELECT SYSDATE,ADD_MONTHS(SYSDATE,2),ADD_MONTHS(SYSDATE,-2),LAST_DAY(SYSDATE),MONTHS_BETWEEN(SYSDATE,DATE'2015-12-22'),MONTHS_BETWEEN(SYSDATE,DATE'2020-12-22'),NEXT_DAY(SYSDATE,'SUNDAY'),NEXT_DAY(SYSDATE,'SUN'), TRUNC(SYSDATE),TRUNC(SYSDATE,'hh'),TRUNC(SYSDATE,'month'),TRUNC(SYSDATE,'YEAR'),round(sysdate,'year')FROM DUAL;
SYSDATE ADD_MONTHS(SYSDATE,2) ADD_MONTHS(SYSDATE,-2) LAST_DAY(SYSDATE) MONTHS_BETWEEN(SYSDATE,DATE'2015-12-22') MONTHS_BETWEEN(SYSDATE,DATE'2020-12-22') NEXT_DAY(SYSDATE,'SUNDAY') NEXT_DAY(SYSDATE,'SUN') TRUNC(SYSDATE) TRUNC(SYSDATE,'HH') TRUNC(SYSDATE,'MONTH') TRUNC(SYSDATE,'YEAR') ROUND(SYSDATE,'YEAR')--------- --------------------- ---------------------- ----------------- ---------------------------------------- ---------------------------------------- -------------------------- ----------------------- -------------- ------------------- ---------------------- --------------------- ---------------------03-SEP-18 03-NOV-18 03-JUL-18 30-SEP-18 32.4008778 -27.5991222 09-SEP-18 09-SEP-18 03-SEP-18 03-SEP-18 01-SEP-18 01-JAN-18 01-JAN-19