ulrikeG


Hi All,

I need a solution for the following:

I have a field with datatype string, length 8, in the form yyyymmdd (f.e. 20070604).

Now I need to transfer this field into a field with datatype dt_DBDATE or DT_DBDATE.

I tried to perform this with a derrived column and type cast (DT_DATE) or (DT_DBDATE), but this does not work.

Any hint for me!!!

Thanks in Advance

ulrike





Re: SSIS Data Conversion: Convert a String (like yyyymmdd) into Datatype dt_DBDATE or dt_DBDATE

Phil Brammer


Please search this forum... Plenty of examples dealing with this exact topic.

You'll need to use a derived column and substrings on your date field to build it so that it looks like this:

mm/dd/yyyy

Then around all of the substrings you can perform your cast.

(DT_DBDATE)(substring............)






Re: SSIS Data Conversion: Convert a String (like yyyymmdd) into Datatype dt_DBDATE or dt_DBDATE

Rafael Salas

Here you have on thread:

http://forums.microsoft.com/MSDN/ShowPost.aspx PostID=1656398&SiteID=1

I know there more







Re: SSIS Data Conversion: Convert a String (like yyyymmdd) into Datatype dt_DBDATE or dt_DBDATE

ulrikeG

Hi Rafael,

Thank your for the link to the thread.

The urgent thing I found:

"It's vitally important to have both a success path and an error path coming from your Derived Column transform."

I configured an ErrorOutput and now it works!!!

Great.

ulrikeG