数据库中日前的比较
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()方法将字符串行的日期转换成日前类型。
发布时间: 2012-07-15 20:11:36 作者: rapoo
数据库中日前的比较
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()方法将字符串行的日期转换成日前类型。