in reply to DBI, SQL and Dates
Your problem is likely to be here, single quoted scalar variables. Why do these need quoting? Remove the quotes and try it again.