Oracle FAQ | Your Portal to the Oracle Knowledge Grid |
Home -> Community -> Mailing Lists -> Oracle-L -> Date math
The following SQL is selecting data older than one month ago. I need to
change it to select data older than 7 days ago. Does anyone know the
TO_CHAR(TO_DATE(SYSDATE etc. syntax to calculate a date of seven days
ago?
SELECT * FROM MR_PURCHASED_ITEMS
WHERE PI_ORDER_DATE <= ADD_MONTHS(SYSDATE,-1) ;
Any information is appreciated.
Thanks,
Linda Received on Tue Jul 25 2000 - 18:50:56 CDT