Oracle FAQ Your Portal to the Oracle Knowledge Grid
HOME | ASK QUESTION | ADD INFO | SEARCH | E-MAIL US
 

Home -> Community -> Mailing Lists -> Oracle-L -> Date math

Date math

From: Linda Hagedorn <Linda_at_pets.com>
Date: Tue, 25 Jul 2000 16:50:56 -0700
Message-Id: <10569.112953@fatcity.com>


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

Original text of this message

HOME | ASK QUESTION | ADD INFO | SEARCH | E-MAIL US