SQL Server Forums
Profile | Register | Active Topics | Members | Search | Forum FAQ
 
Register Now and get your question answered!
Username:
Password:
Save Password
Forgot your Password?

 All Forums
 SQL Server 2012 Forums
 SSIS and Import/Export (2012)
 Convert Date from Excel Source
 New Topic  Reply to Topic
 Printer Friendly
Author Previous Topic Topic Next Topic  

brubakerbr
Yak Posting Veteran

USA
53 Posts

Posted - 12/18/2013 :  09:53:42  Show Profile  Reply with Quote
I am working on automating some data that I receive from Germany. The Date format comes in as DD.MM.YYYY and I need it to be MM/DD/YYYY.

I am building an import package using SSIS and I added a derived column to change the date format.

I first tried to use

(DT_DATE) [CalendarDay]

but I keep getting an error at the Derived Column when I execute the package.

[Derived Column [2]] Error: SSIS Error Code DTS_E_INDUCEDTRANSFORMFAILUREONERROR.
The "Derived Column" failed because error code 0xC0049064 occurred, and the error
row disposition on "Derived Column.Outputs[Derived Column Output].Columns[Date]"
specifies failure on error.

So I moved through the many examples in StackExchange (all that I could find at least) and was met with the same error or not the desired output.

Any suggestions.

Brian D. Brubaker
Business Intelligence Analyst
Viega LLC

brubakerbr
Yak Posting Veteran

USA
53 Posts

Posted - 12/18/2013 :  10:09:56  Show Profile  Reply with Quote
I fixed the error by using the Substring Method that was provided by user3112708 and making an minor alteration to the numbering sequence.

SUBSTRING(CalendarDay,4,2) + "/" + SUBSTRING(CalendarDay,1,2) + "/" +
SUBSTRING(CalendarDay,7,4)

Thank you every one for your help.


Brian D. Brubaker
Business Intelligence Analyst
Viega LLC
Go to Top of Page
  Previous Topic Topic Next Topic  
 New Topic  Reply to Topic
 Printer Friendly
Jump To:
SQL Server Forums © 2000-2009 SQLTeam Publishing, LLC Go To Top Of Page
This page was generated in 0.31 seconds. Powered By: Snitz Forums 2000