records dated after today delphi
Posted on 2014-03-24
I am struggling to write a delphi program that reads orders delivered after today.
The query works fine for all records but I am struggling to set the parameter 'today'
Here is the query:
Query2.SQL.Add('SELECT DISTINCT D.DocNo,D.OrderNo, D.Ordered, D.Delivered,D.InvNo, D.Invoiced, D.AccNo, D.CRef,D.Items, D.Area,D.goods,D.Nett, D.VAT,D.SurchargeRate, D.SurchargeVal,D.State,D.held, 99 as roof ' );
Query2.SQL.Add(' FROM "GOOrders.DB" D WHERE (D.Delivered >Date()) ORDER BY D.Delivered, D.AccNo');
It is the 'D.Delivered > Date()' that I cannot get.
Does anybody know how to set this, please?