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: Volker Neurath <neanderix_at_gmx.de>
Date: Sat, 06 Oct 2001 22:59:23 +0200
Message-ID: <9pnr2t$ju0nu$2@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 - 15:59:23 CDT

Original text of this message

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