Wednesday, February 28, 2018

Datetime conversion from Oracle to MSSQL problem in SSIS

One day I had a problem encountering some problem within SSIS using Datetime conversion especially when passing parameters from one flow to another.

One of the problem which intrigues me that this date time issue when I tries to input

It ran fine on my Evaluate Expression but when I ran my SSIS it came out this problem.

Error: The data types "DT_WSTR" and "DT_DATE" are incompatible for binary operator "+". The operand types could not be implicitly cast into compatible types for the operation. To perform this operation, one or both operands need to be explicitly cast with a cast operator.

What I did is to change my length to 50 and my variable to pass in as DateTime and everything ran successful.

The DateTime issue will encounter quite common on dealing with databases especially when you are handling different data sources. My advice will be always pass as DateTime rather than convert into string unless you absolutely have to. (eg. showing on UI)


Anonymous said...

Best Online Casino | 7 Casino Sites: Reviewed, Rated and Rated by
8 Casino Sites ✓ Online 메리트 카지노 고객센터 Casino 카지노사이트 Games ✓ Best Welcome Bonus Codes ✓ Slots ✓ Table Games ✓ Best Mobile Casino Games 제왕카지노 ✓ Online Slots.

kadischapaddock said...

Betfair | Casino, Hotels, Restaurants & Rooms | Mapyro
Find the best 강릉 출장샵 hotels, motels, and places to 안성 출장안마 stay in 당진 출장마사지 and stay at Betfair, 양산 출장마사지 near Brybeke 시흥 출장샵 and Stirling, Ireland.