要改成这样。
var da:Tdatetime;
da:=strtodate(edit1.text+'-'+edit2.text+'-2');//随便加个2号
sql.Add('select sum(atu) as num from 好大一张表 where datediff(MM,time,'''+datetostr(da)+''')=0');
或
with qry1 do begin
close;
sql.clear;
sql.add('select sum(atu) as num from 好大一张表 where datediff (MM,time,aram1)=0');
parameters.parambyname('param1').value=strtodate(edit1.text+'-'+edit2.text+'-2');
open;
end;