Quantcast
Channel: SQL Server Integration Services forum
Viewing all articles
Browse latest Browse all 24688

How to load date column in yyyy/mm/dd format when issue_date column is text format like 1.9.2009 or 31.8.2009 or 31.12.2009 using derived column transformation in SSIS?

$
0
0

Hi,

I have one column name issue_date in .csv file.

That filed has values like 1.9.2009 or 31.8.2009 or 31.12.2009 or 1.11.2010.

I want to load this column into table with date data type so in yyyy/mm/dd.

Using derived column in ssis, I got the yyyy and dd but I am not able to get mm from input column issue_Date.

To get day I used,  FINDSTRING1 == 2 ? SUBSTRING("0" + [Issue Date],1,2) : SUBSTRING([Issue Date],1,2)

where FINDSTRING1 = FINDSTRING([Issue Date],".",1)

To get year I used,   REVERSE(SUBSTRING(REVERSE([Issue Date]),1,4))

Please suggest. thanks for the help in advance.


Vicky


Viewing all articles
Browse latest Browse all 24688

Trending Articles



<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>