with query1 do
begin
close;
sql.clear;
sql.add('select * from table where time>date');
parambyname('date').asdatetime:=strtodatetime(copy(edit1.text,1,4)
+'-'+copy(edit1.text,5,2)+'-'+copy(edit1.text,7,2)
);
open;
end;
即可
begin
close;
sql.clear;
sql.add('select * from table where time>date');
parambyname('date').asdatetime:=strtodatetime(copy(edit1.text,1,4)
+'-'+copy(edit1.text,5,2)+'-'+copy(edit1.text,7,2)
);
open;
end;
即可
adoquery1.sql.add('select * from main where 日期=#'+edit1.text+'#');
要注意在edit1卡只能输入这样的格式才可以2002-01-01