Subtract Month from a given date : ADD_MONTHS « Date Timezone « Oracle PL / SQL






Subtract Month from a given date


SQL>
SQL> SELECT TO_CHAR(SYSDATE, 'ddMONyyyy') Today,
  2  TO_CHAR(ADD_MONTHS(SYSDATE, 3), 'ddMONyyyy') "+ 3 mon",
  3  TO_CHAR(ADD_MONTHS(SYSDATE, -23), 'ddMONyyyy') "- 23 mon"
  4  FROM dual;

TODAY     + 3 mon   - 23 mon
--------- --------- ---------
30AUG2006 30NOV2006 30SEP2004

SQL>
SQL>

           
       








Related examples in the same category

1.ADD_MONTHS: Schedule a number of months after the current date
2.Adding one month to SYSDATE
3.Adding two months to current date
4.Combine to_char with add_months
5.select add_months( sysdate, 12 ) "Next Year"
6.select add_months( sysdate, -12 ) "Last Year"