PL/SQL (MOSC)

MOSC Banner

extracting time and range it

edited Jun 9, 2015 4:37AM in PL/SQL (MOSC) 4 commentsAnswered ✓

hi,

I have a database field named timeinout with date datatype. I could extract the time with

select to_char(timeinout,'hh24:mi') from my_table.

but when i try this statement (s):

select * from my_table

where to_char(timeout,'hh24:mi') between to_date ('12:00','hh24:mi) and to_date('12:30' ,'hh24:mi') i get an error.

My purpose is just to extract data that has timeinout between 12:00 and 12:30. Any tips would be highly appreciated. I have been looking for solution in the web but could not find it.

database is 10g.

thanks,

Mon

Howdy, Stranger!

Log In

To view full details, sign in to My Oracle Support Community.

Register

Don't have a My Oracle Support Community account? Click here to get started.

Category Leaderboard

Top contributors this month

New to My Oracle Support Community? Visit our Welcome Center

MOSC Help Center