select * from 表名 where to_date(ip_date,'yyyy.mm.dd') between to_date('20190204','yyyymmdd') and to_date('20190209','yyyymmdd') and substr(ip_time,12,8) between '00:00:00' and '08:00:00'
where date_Col between to_date('20190204','YYYYMMDD') and to_date('20190209','YYYYMMDD')
and to_char(date_Col,'HH24') between '00' and '08'