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 11:08:09 +0800
Message-Id: <10569.112961@fatcity.com>


try this
select trunc(sysdate) -7 from dual

> -----Original Message-----
> From: Jim Walski [SMTP:jwalski_at_deltanet.com]
> Sent: Wednesday, July 26, 2000 10:04 AM
> To: Multiple recipients of list ORACLE-L
> Subject: Re: Date math
>
> I might be missing something in your post but wouldn't this work:
>
> SELECT *
> FROM MR_PURCHASED_ITEMS
> WHERE PI_ORDER_DATE < TRUNC(SYSDATE)-7;
>
> Hth, Jim
>
>
> -----Original Message-----
> To: Multiple recipients of list ORACLE-L <ORACLE-L_at_fatcity.com>
> Date: Tuesday, July 25, 2000 5:42 PM
>
>
> >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).
> >
>
> --
> Author: Jim Walski
> INET: jwalski_at_deltanet.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 - 22:08:09 CDT

Original text of this message

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