I have a source with 0000-00-00 in a datetime field. When I try to copy that to an SQL destination the error pops up.
Im trying a derived column to fix it. When it’s 0000-00-00 change it to NULL.
Here’s the pic.

Why isn’t it working? I’ve tried changing the 0000-00-00 00:00:00 to 0000-00-00 and still, it won’t work.
Explanation:
Try the following expression to resolve the issue. Since your incoming field is of
DATETIMEdata type and you want to ignore all the values that have zeroes in them. You can find the DAY of the given datetime value and check whether if it is zero or not. If it is zero, you need to use the NULL functionNULL(DT_DBTIMESTAMP)else you can simply use the field name, which contains the valid date and time value. Then, type cast the whole expression into data typeDT_DBTIMESTAMPExpression: