我在数据库中有一个数据表,里面有一个日期字段,数据类型尾为datetime。在程序中我要做一个按
日期对数据库进行查询的操作。语句该怎么写。我写的语句有错误,说string 转化为datetime有错误
查询语句如下:
if combobox1.Text='按日期查询' then
 with ADOQuery1 do
 begin
   close;
   sql.Clear;
   sql.add('select * from Record where datetimes='+quotedst(edit1.text));
   open;
 end