SqlString:='select * from DataTable where DataT>#2002-8-1 8::00::00#';
如取当前时间,可用formatDateTime函数:
SqlString:='select * from DataTable where DataT>#'+FormatDateTime('yyyy-mm-dd hh::nn::ss',now')+'#';
with query1 do
begin
close;
sql.clear;
sql.add('select * from DataTable');
SQL.Add('where birthday>:firstday');
Params[0].value:='2002-8-1 08:00:00';
Prepare ;
Open;
end;