How do I fix 'Invalid character value for cast specification' on a date column in flat file?

后端 未结 3 400
春和景丽
春和景丽 2021-01-04 04:48

I have a CSV file with a {LF} delimiting each row and a date column with the date format as \"12/20/2010\" (including quotation marks)

My destination co

3条回答
  •  花落未央
    2021-01-04 05:28

    I was ultimately able to resolve the solution by setting the column type in the flat file connection to be of type "database date [DT_DBDATE]"

    Apparently the differences between these date formats are as follow:

    DT_DATE A date structure that consists of year, month, day, and hour.

    DT_DBDATE A date structure that consists of year, month, and day.

    DT_DBTIMESTAMP A timestamp structure that consists of year, month, hour, minute, second, and fraction

    By changing the column type to DT_DBDATE the issue was resolved - I attached a Data Viewer and the CYCLE_DATE value was now simply "12/20/2010" without a time component, which apparently resolved the issue.

提交回复
热议问题