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

Home -> Community -> Usenet -> c.d.o.misc -> Re: Date Search (fromdate TO todate)

Re: Date Search (fromdate TO todate)

From: Jim Kennedy <kennedy-family_at_home.com>
Date: Sat, 06 Oct 2001 22:41:47 GMT
Message-ID: <LMLv7.18111$JN.65202@news1.sttls1.wa.home.com>


Yes. I try to stay away from it just because people have a tendency to reverse the order of the between and then they won't find what they are looking for. I think the order should not matter given what between means in natural language, but alas it does.
Jim
"Volker Neurath" <neanderix_at_gmx.de> wrote in message news:9pnr2t$ju0nu$2_at_ID-29596.news.dfncis.de...
> Jim Kennedy wrote:
>
> >select ... from mytable where to_date('01/15/2001','mm/dd/yyyy')
> ><=theDateColumn and to_date('01/20/2001','mm/dd/yyyy') >=theDateColumn
>
> Much more Simple:
>
> SELECT...
> FROM table
> WHERE datefield BETWEEN to_date('01/15/2001','mm/dd/yyyy') AND
> to_date('01/20/2001','mm/dd/yyyy');
>
> With this you don't have to use >,<,<=,>= and you have to type the
> name of your datefield only one time, insted of typing it twice.
>
> Volker
Received on Sat Oct 06 2001 - 17:41:47 CDT

Original text of this message

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