I am using SSIS to export a sql statement. Within that sql statement is a portion for date. I want the date to come out into the .txt file as YYYY-MM-DD. I am able to generate this string just fine in the SQL query window and in the SSIS previews, with the following:
SELECT CONVERT(VARCHAR(10), AZ_Order_Child.Ship_Date,120 ) AS [ship-date]...
HOWEVER, when it comes out onto the actual text file, I get the following:
What I want is 2012-09-07 only.
Any ideas what is causing this and how I can stop it? Like I said, the query results and export preview show it formatted exactly as I want it.