dm.xiaosou_adoquery.SQL.Add('select * from xiaosou_biao where jfsj between "'+ DateToStr(DateTimePicker1.Date) +'" and "'+DateToStr(DateTimePicker2.date)+'"');
我来抢分: dm.xiaosou_adoquery.SQL.Add('select * from xiaosou_biao where jfsj between '+ QuotedStr(DateToStr(DateTimePicker1.Date)) +'and '+QuotedStr(DateToStr(DateTimePicker2.date))); 有时候如果你的驱动安装不对的话也是有影响的。
' ( jfsj > #'+DateToStr(DateTimePicker1.Date)+'# and jfsj < #'+DateToStr(DateTimePicker2.Date)+'#)'
dm.xiaosou_adoquery.SQL.Add('select * from xiaosou_biao where jfsj between '+ QuotedStr(DateToStr(DateTimePicker1.Date)) +'and '+QuotedStr(DateToStr(DateTimePicker2.date)));
有时候如果你的驱动安装不对的话也是有影响的。