curdate() returns wrong values
Posted: Mon Aug 08, 2005 2:40 pm
I'm tring to calculate the aging value of an invoice. Here is the SQL statement:
SELECT invoice_number, company_name, curdate( ) , invoice_date,
curdate( ) - invoice_date AS aging
FROM invoices
Here is one of the lines that is returned:
56554 Company A 2005-08-08 2005-07-28 80
The aging value is 80 but should be 11.
SELECT invoice_number, company_name, curdate( ) , invoice_date,
curdate( ) - invoice_date AS aging
FROM invoices
Here is one of the lines that is returned:
56554 Company A 2005-08-08 2005-07-28 80
The aging value is 80 but should be 11.