trying to subtract days from a date
658699Aug 14 2009 — edited Aug 14 2009Im trying to subtract days from a date.
When i use this query:
select sysdate-:p21_DAYS_OLD from dual;
it displays the correct date but not in the correct format. It is displaying 12-AUG-09 instead of 08/12/2009.
I tried this query but i get the ORA-01722: invalid number error.
select to_char(sysdate,'MM/DD/YYYY')-(:p21_DAYS_OLD) from dual;
Can someone help me please?
Deanna