See the thing is if the values in the original database were NUll, it was setting the date to 0-0-0, which is invalid in SQL.
So I did a test to see if the original values are NULL, then set the variable to ""(blank) which converts to 1900-01-01 00:00:000 which is a good date for SQL.