数据库中日前的比较 select * from tb_product where createdate > to_date('2011-6-15','yyyy-MM-dd') - 1 and createdate<=to_date('2011-6-16','yyyy-MM-dd') + 1;通过to_date()方法将字符串行的日期转换成日前类型。