Subtracting Number of Days from a Date in PL/SQL

user2706266 picture user2706266 · Oct 22, 2013 · Viewed 154.9k times · Source

I would like to subtract a given x number of days from sysdate, can someone assist me on how to do that, I am using the PL/SQL language. THANKS!

Answer

Abhijith Nagarajan picture Abhijith Nagarajan · Oct 22, 2013

Use sysdate-1 to subtract one day from system date.

select sysdate, sysdate -1 from dual;

Output:

SYSDATE  SYSDATE-1
-------- ---------
22-10-13 21-10-13