stringdatetimessisderived-column

SSIS convert datetime string to date yyyy-mm-dd


I have a SSIS package that reads a csv file, one of the columns contains a date-time string such:

DatePaid
2020-12-03 15:22:45

I am using the derived columns transformation editor, and would like to find out how can the date-time string can be converted to only date.

Will it be like this:

(DT_DBDATE)[DatePaid]

Is it possible to get some help with an example?


Solution

  • You can use a new column DatePaidConverted and add (DT_DBDATE)[DatePaid] in the Expression. In your destination, map DatePaidConverted to [DatePaid]