select * from aa where 
 to_char(aa.date1,'yyyy-mm-dd') >= '1999-01-01' and to_char(aa.date1,'yyyy-mm-dd') <= '2003-08-28'