0

I have a table named callinfo and it has records like below.

call#         callstarted                  callended

 1        03-04-2013 12:04:28 pm       03-04-2013  01:37:07 pm
 2        03-04-2013 01:15:02 pm       03-04-2013  02:12:15 pm
 3        04-05-2013 11:45:01 am       04-05-2013  01:20:35 pm

How can i retrieve records from callinfo between 1:00 pm to 1:15 pm?

Amit Bera
  • 7,581
  • 7
  • 31
  • 57

1 Answers1

0

Assuming they are date columns:

select * 
from callinfo
where  callstarted>=to_date(to_char(callstarted,'DD-MON-YYYY')||' 13:00','DD-MON-YYYY HH24:MI')
and    callended<=to_date(to_char(callended,'DD-MON-YYYY')||' 13:15','DD-MON-YYYY HH24:MI')
kayakpim
  • 985
  • 2
  • 8
  • 28