hidrau
asked on
I need to make a query but I don't figure out where is the problem with datetime
I made a query where I want all the records that their datetime is less than now()
But no records my query is retrieving me, why?
With Query do
Begin
Close;
Sql.Clear;
Sql.Add('SELECT * FROM CTRSERVFAX');
Sql.Add('WHERE SVFX_DATETIME<=:DT AND SVFX_STATUSFAX<>"E"');
Sql.Add('ORDER BY SVFX_DATAHORA DESC');
Parameters.ParamByName('DT ').Value := Now();
Open;
end
I use access as my database.
Thanks
But no records my query is retrieving me, why?
With Query do
Begin
Close;
Sql.Clear;
Sql.Add('SELECT * FROM CTRSERVFAX');
Sql.Add('WHERE SVFX_DATETIME<=:DT AND SVFX_STATUSFAX<>"E"');
Sql.Add('ORDER BY SVFX_DATAHORA DESC');
Parameters.ParamByName('DT
Open;
end
I use access as my database.
Thanks
ASKER
Datetime doesn't exist in D5?
I got a delphi message = Undeclared identifier Datetime
I got a delphi message = Undeclared identifier Datetime
ASKER CERTIFIED SOLUTION
membership
Create a free account to see this answer
Signing up is free and takes 30 seconds. No credit card required.
Parameters.ParamByName('DT