Board index » delphi » total amounts between two dates

total amounts between two dates

If any kind person could help a newbie to calculate an amount between two
dates I would be very gratefull..I'm using dbase, a one to many setup..
one client many payments.Every works fine(thanks to the data wizard setup)
but to finish off with the above feature would be great!!

Re:total amounts between two dates

You can use a TQuery object and select it in using SQL.  The following example
is using the DBDEMOS database that comes with Delphi C/S:

select sum(itemsTotal) from orders
SaleDate >= '4/12/88' and

Now if you have to do a join you would do something like this:

select sum(a.itemsTotal) as total, from orders a,
customer b
a.SaleDate >= '4/12/88' and
and a.custno = b.custno
group by
Hope this helps

Other Threads