convert the WSTR value to date in ssis

Naresh y 146 Reputation points

Hi have a string column in which dates are there , i would like to send the rows into to the date column

the below error i found it,how do i convert this wstr value to date using data conversion transformation

[OLE DB Destination [40]] Error: There was an error with OLE DB Destination.Inputs[OLE DB Destination Input].Columns[LostDate] on OLE DB Destination.Inputs[OLE DB Destination Input]. The column status returned was: "The value could not be converted because of a potential loss of data.".

SQL Server Integration Services
SQL Server Integration Services
A Microsoft platform for building enterprise-level data integration and data transformations solutions.
2,451 questions
{count} votes

3 answers

Sort by: Most helpful
  1. Naresh y 146 Reputation points

    Date column


    0 comments No comments

  2. Yitzhak Khabinsky 24,941 Reputation points

    Hi @Naresh y

    Please try the following expression:

    (DT_DBDATE)(SUBSTRING([column_name],1,4) + "-" +  
     SUBSTRING([column_name],5,2) + "-" + SUBSTRING([column_name],7,2))  
    0 comments No comments

  3. ZoeHui-MSFT 32,586 Reputation points

    Hi @Naresh y ,

    Right click, Show Advanced Editor in the Data Conversion.

    And then Goto Input and Output Properties---Expand Data Conversion Output and click on the date column---Set FastParse to True in the Custom Properties.




    If the answer is the right solution, please click "Accept Answer" and kindly upvote it. If you have extra questions about this answer, please click "Comment".

    Note: Please follow the steps in our documentation to enable e-mail notifications if you want to receive the related email notification for this thread.

    0 comments No comments