Click here to Skip to main content
14,575,683 members
Rate this:
Please Sign up or sign in to vote.
See more:
Hi All,

I need a solution for the following:

I have a field with datatype decimal, length 7, in the form yyyymmdd (f.e. 2007060).

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

I want requiring solution using a Script component in SSIS and i want C# code which is write in Script.

Any hint for me!!!

Thanks in Advance

1 solution

Rate this:
Please Sign up or sign in to vote.

Solution 1

privae DateTime convertDate()

           string inputDate = "20140214";
           DateTime outputDate = Convert.ToDateTime(inputDate.Substring(4, 2) + "/" + inputDate.Substring(5, 2) + "/" + inputDate.Substring(0, 4));
           return outputDate;


This content, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)

CodeProject, 503-250 Ferrand Drive Toronto Ontario, M3C 3G8 Canada +1 416-849-8900 x 100