Extracting data from a flat file. Field in question comes in as a string and is formatted to fit db column of type Datetime. Field allows null in the database and file contains nulls and valid strings that successfully convert to dates in this field.
SSIS is throwing an error when I try and pass the nulls on to the database.
Error: An exception has occurred during data insertion, the message returned from the provider is: SqlDateTime overflow. Must be between 1/1/1753 12:00:00 AM and 12/31/9999 11:59:59 PM.
([PO Scheduled Ship Date] == "") ? NULL(DT_DBTIMESTAMP) : (DT_DBTIMESTAMP)(SUBSTRING([PO Scheduled Ship Date],1,4) + "-" + SUBSTRING([PO Scheduled Ship Date],5,2) + "-" + SUBSTRING([PO Scheduled Ship Date],7,2))
Culprit was data outside of the date range ex. "00010101".