SSIS convert datetime string to date yyyy-mm-dd

649 Views Asked by At

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?

1

There are 1 best solutions below

0
On BEST ANSWER

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