Ask Your Question

Revision history [back]

click to hide/show revision 1
initial version

Query, add 30 days to date, then compare

The goal is to test two date, reporting when the first date + 30 days is greater than the second date. I have tried several versions of the following but can't make it work. The error indicates a problem with "NewDate". Any help greatly appreciated.

SELECT "MemberID" "MemberID", "LastName" "LastName", "FirstName" "FirstName", "DateJoined" "DateJoined", "LastRenewalDate", "MemberThruDate" "MemberThruDate", DATEDIFF('dd','12-30-1899',"LastRenewalDate") +30 AS "NewDate" FROM "MemberMaster" "MemberMaster" WHERE "FirstName" != '|' HAVING "NewDate" > "MemberThruDate" ORDER BY "MemberID" ASC