J jihlz Unregistered / Unconfirmed GUEST, unregistred user! 2002-12-17 #1 如何用DateTimePicker和ADOQuery对表中的日期进行查询,请各位高手指点。
无 无疯无禄 Unregistered / Unconfirmed GUEST, unregistred user! 2002-12-17 #3 用参数 AdoQuery.Sql.Add('Select * from Where Date=ate'); AdoQuery.parameter.ParamByName('Date').AsDate:=DateTimePicker.Date; AdoQuery.Open;
用参数 AdoQuery.Sql.Add('Select * from Where Date=ate'); AdoQuery.parameter.ParamByName('Date').AsDate:=DateTimePicker.Date; AdoQuery.Open;
Y yeath Unregistered / Unconfirmed GUEST, unregistred user! 2002-12-17 #5 with adoquery1 do begin sql.text := 'select * from test where convert(char(10),rq,121)='''+FormatDateTime('YYYY-MM-DD',dtp_date.DateTime) + ''''; open; end;
with adoquery1 do begin sql.text := 'select * from test where convert(char(10),rq,121)='''+FormatDateTime('YYYY-MM-DD',dtp_date.DateTime) + ''''; open; end;