Convert String date in flat file to sql date column in SSIS package

My Flat file has a date column in this format: 2020-03-31

My SQL table has a column SaleDate as Date datatype : Example: 2020-11-01

I am getting error when I am importing the data:

Data conversion failed while converting column "SaleDate" (74). The conversion returned status value 2 and status text "The value could not be converted because of a potential loss of data.".

What I tried:

I tried to update the flat file date as dt_Dbdate and dt_timestamp

either of them are not working.

I tried data conversion, even that is not working

Can someone know how to handle this?

Thank you

1 answer

  • answered 2020-11-25 01:44 Sai Abhiram Inapala

    The value could not be converted because of a potential loss of data
    

    Usually this error occurs when the destination column size is smaller than the source column.