Hi @SHREERAAMAA ,
So you have missing month and day to make a year it into a legit date.
How about (DT_DBDATE)(CONCAT([Year], "-01-01"))
This browser is no longer supported.
Upgrade to Microsoft Edge to take advantage of the latest features, security updates, and technical support.
Good day,
I am using SSIS.
Data source is "Flat File Source"
Issue column name: [Years]
Data in this column [Years] shows only Years like 2000, 2010, 2011, 2021, 2222
Target is SQL Server table. In SQL Server target table [Years] column data type is "Date"
Can't move data from Flat File source to SQL Server target because of the Data type issue.
Please help
Thank you
Hi @SHREERAAMAA ,
So you have missing month and day to make a year it into a legit date.
How about (DT_DBDATE)(CONCAT([Year], "-01-01"))
Thank you for your response.
Basically, [Years] source column data type is [DT_STR] and would like to push this data as is to Target table, SQL Server target column data type is DATE.
Thank you
Hi @SHREERAAMAA ,
If your source data format is yyyy-MM-dd and you want to convert it to DATE, you may add the Derived Column with below code.
(DT_DBDATE)datecolumn
And then you may load it to SQL Server table.
I would like to get YEAR from there.
However I could not get the meaning of this, what result do you want to get? Could you please explain it with more details?
Regards,
Zoe
If the answer is the right solution, please click "Accept Answer" and kindly upvote it. If you have extra questions about this answer, please click "Comment".
Note: Please follow the steps in our documentation to enable e-mail notifications if you want to receive the related email notification for this thread.
IThank you.
I have added Month and day (yyyy-MM-dd).
I would like to get YEAR from there.
Thank you