You want to see if a field in your table matches today's date?
with qryName do
begin
SQL.Clear;
SQL.Add('SELECT * FROM TABLE WHERE FIELDNAME = ' + FormatDateTime('mm/dd/yyyy', Today));
Active := True;
end;
To see if a field in the query matches today then:
with qryName do
begin
SQL.Clear;
SQL.Add('SELECT * FROM TABLENAME');
Active := True;
if FieldByName('DATEFIELD').AsDate = Today then
begin
//do something
end;
end;
This site uses cookies to help personalise content, tailor your experience and to keep you logged in if you register.
By continuing to use this site, you are consenting to our use of cookies.