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

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

RE : Date math

From: J <TiffanyDu_at_pcdc.com.tw>
Date: Wed, 26 Jul 2000 09:21:09 +0800
Message-Id: <10569.112956@fatcity.com>

	 SELECT * FROM MR_PURCHASED_ITEMS
	  WHERE PI_ORDER_DATE <=TRUNC(SYSDATE) -7




> -----Original Message-----
> From: Linda Hagedorn [SMTP:Linda_at_pets.com]
> Sent: Wednesday, July 26, 2000 8:56 AM
> To: Multiple recipients of list ORACLE-L
> Subject: 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
>
>
>
>
> --
> Author: Linda Hagedorn
> INET: Linda_at_pets.com
>
> Fat City Network Services -- (858) 538-5051 FAX: (858) 538-5051
> San Diego, California -- Public Internet access / Mailing Lists
> --------------------------------------------------------------------
> To REMOVE yourself from this mailing list, send an E-Mail message
> to: ListGuru_at_fatcity.com (note EXACT spelling of 'ListGuru') and in
> the message BODY, include a line containing: UNSUB ORACLE-L
> (or the name of mailing list you want to be removed from). You may
> also send the HELP command for other information (like subscribing).
Received on Tue Jul 25 2000 - 20:21:09 CDT

Original text of this message

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