I want to return results only when the 'DueDate' has passed.
query...
SELECT COUNT(*) AS OutStanding
FROM tblInvoices INNER JOIN tblCustomers ON tblInvoices.customer_id = tblCustomers.customer_id
WHERE tblCustomers.Active = 1
AND DueDate < ".strftime( "%m/%d/%Y", time() )."
AND PaidDate IS NULL
output...
SELECT COUNT(*) AS OutStanding
FROM tblInvoices INNER JOIN tblCustomers ON tblInvoices.customer_id = tblCustomers.customer_id
WHERE tblCustomers.Active = 1
AND DueDate < 11/04/2003
AND PaidDate IS NULL
however this never returns results, there are 'DueDate' fields that occour in the past.
it works fine if I remove the line: "AND DueDate < ".strftime( "%m/%d/%Y", time() )."