SSIS Script Component Transformation C# Code Date Conversion -
i'm creating ssis packages import large fixed width text documents , need transform various fields. 1 such field represents dates , 8 characters wide. format "yyyymmdd" , this: somedatefield 20130415 20110122 19891023 however, fields have blank spaces, , have zeroes 00000000. cannot converted date should return null value. i'm not allowed substitute date 1/1/1900. after futilely trying convert date field expressions, turned c# script transformation. my input column called ssolddate , readonly. i've configured output called solddate of dt-dbdate data type. the code came works is: datetime vardate; bool isparsed; isparsed = datetime.tryparseexact(row.ssolddate, "yyyymmdd", cultureinfo.invariantculture, datetimestyles.none, out vardate); if (isparsed) { row.solddate = vardate; } else { row.solddate_isnull = true; } i follow other date fields 1 in text...