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: Novice: select by time

Re: Novice: select by time

From: Jim Kennedy <kennedy-family_at_attbi.com>
Date: Fri, 28 Jun 2002 02:16:39 GMT
Message-ID: <bGPS8.330896$352.37440@sccrnsc02>


If he does
select .. from ..
where trunc(dateField)=dateField
That will work.

Jim
"Daniel Morgan" <dmorgan_at_exesolutions.com> wrote in message news:3D1B2C41.41F3F7E1_at_exesolutions.com...
> Per-Arne Hellarvik wrote:
>
> > trunc(<datetime>) should do the work....
> >
> > On Thu, 27 Jun 2002 16:34:09 +0200, dsmcd wrote:
> >
> > > Hello...
> > >
> > > I'd like to select all records whose time is 00:00:00 in a datetime
> > > field ('MM/DD/YY HH24:MI:SS').
> > >
> > > Any suggestions?
> > >
> > > Thanks in advance,
> > > D.
>
> This will remove the time ... not select the time.
>
> Try this instead:
>
> SELECT fields
> FROM table
> WHERE TO_CHAR(date_field, 'HH:MI:SS') = '00:00:00';
>
> Daniel Morgan
>
Received on Thu Jun 27 2002 - 21:16:39 CDT

Original text of this message

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