S
sysd
Unregistered / Unconfirmed
GUEST, unregistred user!
日期变量的格式好象不对,不知应该如何改,求各位老大指教,谢谢。
var
date01:TDateTime;
begin
date01:=now;
ADOQuery1.Active:=false;
ADOQuery1.SQL.Clear;
ADOQuery1.SQL.Add('select * from Table where date='''+date01+'''');
ADOQuery1.Active:=true;
end;
[错误] Unit1.pas(36): Incompatible types: 'String' and 'TDateTime'
[致命错误] Project1.dpr(5): Could not compile used unit 'Unit1.pas'
var
date01:TDateTime;
begin
date01:=now;
ADOQuery1.Active:=false;
ADOQuery1.SQL.Clear;
ADOQuery1.SQL.Add('select * from Table where date='''+date01+'''');
ADOQuery1.Active:=true;
end;
[错误] Unit1.pas(36): Incompatible types: 'String' and 'TDateTime'
[致命错误] Project1.dpr(5): Could not compile used unit 'Unit1.pas'