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: Geoff Muldoon <gmuldoonNoSpam_at_scu.edu.au>
Date: Fri, 20 Apr 2001 01:39:16 GMT
Message-ID: <3adf9259.10739793@nntp.scu.edu.au>

On Thu, 19 Apr 2001 23:37:50 GMT, "Matt Connors" <connorsm_at_bellatlantic.net> wrote:

>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.

Use the TO_CHAR function.

Select <columns>
from <table>
where
to_char(<date column>,'mm/dd/yy')=to_char(<required date>,'mm/dd/yy')

Geoff M Received on Thu Apr 19 2001 - 20:39:16 CDT

Original text of this message

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