Date and time request in oracle

I have a date type column in a table where I store the date along with the time.

I want to request it in WHERE I did this as follows:

select * 
from conference_hall_book 
where to_date(end_time,'dd/mon/yyyy hh24:mi:ss') <= to_date('26/oct/2013 15:00:00','dd/mon/yyyy hh24:mi:ss')

But the result is 10/27/2013 8:00:00 AM also in the end_time column.

Can someone help me find a bug?

+4
source share
1 answer

The problem is due to

to_date(end_time,'dd/mon/yyyy hh24:mi:ss')

to_date. To_date . Oracle , end_time , /. , "27/10/2013 8:00:00 AM" "27/10/2013" ( dd/mm/yyyy). to_date "27/10/2013" . "27/10/2013 00:00:00", .

- to_date (end_time) end_time. , end_time, .

select * 
from conference_hall_book 
where end_time <= to_date('26/oct/2013 15:00:00','dd/mon/yyyy hh24:mi:ss')
+10

All Articles