Oracle FAQ | Your Portal to the Oracle Knowledge Grid |
![]() |
![]() |
Home -> Community -> Usenet -> c.d.o.misc -> Re: Quering a specific TIME not date
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
![]() |
![]() |