Oracle FAQ | Your Portal to the Oracle Knowledge Grid |
Home -> Community -> Usenet -> c.d.o.tools -> Re: Comparing Dates
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