Convert YYYY-MMM-DD to date in SSIS -


i have flat file date field in format yyyy-mmm-dd hh24:mm:ss :

2015-apr-09 06:57:21.980549 

i load datetime in table, idea how conversion ?

i'm using ssis 2014

the problem silly mmm part.

to rid of without resorting .net script, add derived column following formula:

replace(replace(replace(replace(replace(replace(replace(replace(replace(replace(replace(replace(testdate,"jan","01"),"feb","02"),"mar","03"),"apr","04"),"may","05"),"jun","06"),"jul","07"),"aug","08"),"sep","09"),"oct","10"),"nov","11"),"dec","12") 

then, pipe resulting column data conversion, , set target type db_dbtimestamp2 precision 7 (so not lose data precision) or set db_dbtimestamp if precision loss acceptable.

the latter should implicitly convert date, if not, need explicitly perform conversion.


Comments

Popular posts from this blog

Magento/PHP - Get phones on all members in a customer group -

php - .htaccess mod_rewrite for dynamic url which has domain names -

Website Login Issue developed in magento -