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

Home -> Community -> Usenet -> c.d.o.server -> Re: querying records with date field

Re: querying records with date field

From: Mark D Powell <Mark.Powell_at_eds.com>
Date: Mon, 15 Oct 2007 12:48:41 -0700
Message-ID: <1192477721.822732.287310@q5g2000prf.googlegroups.com>


On Oct 15, 2:47 pm, Jerome Vitalis
<vitalismanN05..._at_gmail.com.invalid> wrote:
> On Mon, 15 Oct 2007 11:33:38 -0700, mrajanikris..._at_gmail.com wrote:
> > hi,
>
> > I want to retrieve records from a table by comparing the date field.
>
> > select * from mytable where joindate >= <my date variable from front-
> > end>
>
> > my date variable contains date time value. So I want to check with date
> > and time.
> >>From the above query, I need to get records whose joindate >= 2007-
> > oct-11 19:25:06
>
> > How can I write the query to check the dates.
>
> > Thanks in advance.
>
> Use the to_date SQL function with the proper date format.- Hide quoted text -
>
> - Show quoted text -

mrajhanikrishna,

It is also common to need to ignore the time portion of the date/time value and just match on the date. See the SQL manual for the TRUNC function for help handling this requirement when you encounter this requirement.

HTH -- Mark D Powell -- Received on Mon Oct 15 2007 - 14:48:41 CDT

Original text of this message

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