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: Quering a specific TIME not date

Re: Quering a specific TIME not date

From: Robert Klemme <shortcutter_at_googlemail.com>
Date: Fri, 26 Jan 2007 14:02:32 +0100
Message-ID: <51ucesF1li99iU1@mid.individual.net>


On 26.01.2007 12:19, Gaz wrote:
> I dont know if its possible as ive tried everything but cant get it to
> work...
>
> My data is stored as a date so its for example 23/03/2007 10:00:00
>
> How would i write a SQL statement to find me all records that have
> 10:00 in them and ignore the date?
>
> Ive tried "Where to_date(fieldname,'24H:MI') >=to_date('10:00',24H:MI')
> but it doesnt work

Why not simply

WHERE TO_CHAR(field, 'HH24:MI') = '10:00'

?

        robert Received on Fri Jan 26 2007 - 07:02:32 CST

Original text of this message

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