Closed. This question needs debugging details . It is not currently accepting answers.
Edit the question to include desired behavior, a specific problem or error, and the shortest code necessary to reproduce the problem . This will help others answer the question.
Closed 8 days ago.
Improve this question
I used derive column to convert date from csv to DB type but I got this error message
This is the date type on csv.
This is the format
This is the table on db
I have tried to use Derived Column with two different expressions. This first:
and this is the second
(DT_DBTIMESTAMPOFFSET,7)(SUBSTRING(Horodatage,1,4) + "-" + SUBSTRING(Horodatage,6,2) + "-" + SUBSTRING(Horodatage,9,2) + " " + SUBSTRING(Horodatage,12,2) + ":" + SUBSTRING(Horodatage,15,2) + ":" + SUBSTRING(Horodatage,18,2))
None of them have worked for me, I always get this error message.
I wanted to fill the temp table with data from the csv but didn't find the right format to make it work.
1条答案
按热度按时间jyztefdp1#
Assuming that the
User::Horodatage
variable values are along the following format:Step #1: Use the following SSIS expression
It will output the following value:
Step #2: Keep the Derived Column Task output data type as
DT_WSTR
.If your target column data type is DATETIMEOFFSET(3), upon insert it will be the following value in the database:
UPDATE
Here is an additional reproducible test.
Output