Click here to monitor SSC
SQLServerCentral is supported by Red Gate Software Ltd.
 
Log in  ::  Register  ::  Not logged in
 
 
 
        
Home       Members    Calendar    Who's On


Add to briefcase ««12

format the output column in destination .csv Expand / Collapse
Author
Message
Posted Tuesday, July 29, 2014 5:33 PM


Ten Centuries

Ten CenturiesTen CenturiesTen CenturiesTen CenturiesTen CenturiesTen CenturiesTen CenturiesTen Centuries

Group: General Forum Members
Last Login: Thursday, December 11, 2014 9:19 AM
Points: 1,046, Visits: 2,739
You can get around this by creating a new column of type DT_DBDATE and using this new column to write to the CSV file.

First, add a new derived column transformation between your source and destination.

Next, add a new column to the derived column transformation. In the Expression field, use something similar to the following: (DT_DBDate)MyOriginalDateColumn. Replace MyOriginalDateColumn in this sample with the name of your date column from the source query. Use the <add as new column> selection to be sure this is a new column.

Finally, in your flat file destination component, use the new date field you just created in place of the original date field from the source.




Tim Mitchell, SQL Server MVP
Independent Business Intelligence Consultant
www.TimMitchell.net
@Tim_Mitchell

Post #1597529
« Prev Topic | Next Topic »

Add to briefcase ««12

Permissions Expand / Collapse