strTemp:=strTemp+' and Paydate>='+strtodatetime(dtpTime.DateTime+1)+' and Paydate<='+strtodatetime(dtpTimeend.DateTime+1);
Paydate在ACCESS为YYYY-MM-DD,DTPTIME为tdatetimepicker控件。
[Error] rwnPleaBillQryShow.pas(259): There is no overloaded version of 'StrToDateTime' that can be called with these arguments
Paydate在ACCESS为YYYY-MM-DD,DTPTIME为tdatetimepicker控件。
[Error] rwnPleaBillQryShow.pas(259): There is no overloaded version of 'StrToDateTime' that can be called with these arguments
你不能用strtodatetime的,要转化成字符串的。
还是用FormatDateTime吧
寫反了,小夥子。
大哥这样时间都有了,不需要时间啊
'#'+FormatDateTime('yyyy-mm-dd',dtpTime.DateTime+'#'也可以用参数的方法
with adoquery1 do
begin
close;
sql.text := 'select * from where ....and Paydate>=:paydate1 and Paydate <=paydate2';
parameters.parambyname('paydate1').value := FormatDateTime('yyyy-mm-dd',dtpTime.DateTime);
....
Open;
end;