为了避免订单有导入的日期格式冲突,在作时间比较的时候需要将前后两个日期都转换 select * from order a where Convert(date,a.OrderDate)>=Convert(date,【datetime1.value】) and Convert(date,a.OrderDate)<=Convert(date,【datetime2.value】)本回答被提问者和网友采纳
第2个回答 2013-12-09
select * from 订单表 where time >= datetime1 and time <= datetime2