Hello all,
Im working on a SSIS Package and I have to do a data transformation but this one is a but tricky. For example
7/6/2015 is my date and when I apply
SUBSTRING(ColumnName,5,4) + "-" + SUBSTRING(ColumnName,3,1) + "-" + SUBSTRING(ColumnName, 1,1)
I get 2015-6-7 which is good
but then when the date is like 10/12/2015 I would have to modify my code
My question is, Is their anything I can add to the code to make the single digits have a zero before them so I can use the same code throughout. My updated code would then be
SUBSTRING(ColumnName,7,4) + "-" + SUBSTRING(ColumnName,4,2) + "-" + SUBSTRING(ColumnName, 2,1)
Thank you!