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

Home -> Community -> Usenet -> c.d.o.tools -> Re: Comparing Dates

Re: Comparing Dates

From: Connor McDonald <connor_mcdonald_at_yahoo.com>
Date: Fri, 20 Apr 2001 19:03:20 +0800
Message-ID: <3AE01778.28EF@yahoo.com>

Matt Connors wrote:
>
> Table A contains a Date column.
>
> The user enters a date in the format "mm/dd/yy" through a User Interface.
>
> I want to select all records in the table that have a date equal to the date
> entered by the user. How do I do this?
>
> My problem is that the Date field in the table also identifies a time of
> day - say 3/31/01 at 14:22. I need to compare the date entered by the user
> to the date in the table ignoring any associated time value.
>
> A code example would be greatly appreciated.
>
> Thanks,
> Matt
>
> Matt_at_ConnorsOfCourse.com

Both the other post's will typically encounter problems by disabling indexes on the column... A better way is normally

where date_col between :the_date and :the_date+0.99999

hth
connor

-- 
===========================================
Connor McDonald
http://www.oracledba.co.uk (mirrored at
http://www.oradba.freeserve.co.uk)

"Some days you're the pigeon, some days you're the statue"
Received on Fri Apr 20 2001 - 06:03:20 CDT

Original text of this message

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