How do I format date value as yyyy-mm-dd using SSIS expression builder?

The Solution to How do I format date value as yyyy-mm-dd using SSIS expression builder? is


Correct expression is

"source " + (DT_STR,4,1252)DATEPART( "yyyy" , getdate() ) + "-" +
RIGHT("0" + (DT_STR,4,1252)DATEPART( "mm" , getdate() ), 2) + "-" +
RIGHT("0" + (DT_STR,4,1252)DATEPART( "dd" , getdate() ), 2) +".CSV"

~ Answered on 2011-08-03 06:50:31


Most Viewed Questions: