Simple Technique to Subtract Years from an Oracle Date


/ Published in: SQL
Save to your folder(s)



Copy this code and paste it in your HTML
  1. to_number(to_char(sysdate,'YYYYMMDD'),'99999999')-50000)
  2. --subtracts 5 years from a date.
  3. -- 20070924
  4. -- -50000
  5. -- =20020924

Report this snippet


Comments

RSS Icon Subscribe to comments

You need to login to post a comment.