select * from tb where substr(recordtime,11,2) between '06' and '18' and to_date(recordtime,'YYYY-MM-DD') between to_date('2011-09-10','YYYY-MM-DD') and to_date('2011-10-01','YYYY-MM-DD')
select * from tb where substr(recordtime,12,2) between '06' and '18' and to_date(recordtime,'YYYY-MM-DD') between to_date('2011-09-10','YYYY-MM-DD') and to_date('2011-10-01','YYYY-MM-DD')
and to_date(recordtime,'YYYY-MM-DD') between to_date('2011-09-10','YYYY-MM-DD') and to_date('2011-10-01','YYYY-MM-DD')
select * from tb where substr(recordtime,12,2) between '06' and '18'
and to_date(recordtime,'YYYY-MM-DD') between to_date('2011-09-10','YYYY-MM-DD') and to_date('2011-10-01','YYYY-MM-DD')