Quantcast
Channel: SQL Server Integration Services forum
Viewing all articles
Browse latest Browse all 24688

Convert sting to datetime

$
0
0

How can I convert it to 

"  2015/07/31" to "31/07/2015"

By using derived column.

I want to TRIM the date field.

I am using this expression:

(DT_DBTIMESTAMP)(SUBSTRING(TRIM([Start Date]),1,4) + "/" + SUBSTRING(TRIM([Start Date]),5,2) + "/" + SUBSTRING(TRIM([Start Date]),7,2))

in Derived column

But giving error :

[Derived Column 1 [5452]] Error: The "component "Derived Column 1" (5452)" failed because error code 0xC0049064 occurred, and the error row disposition on "output column "Start Date" (5650)" specifies failure on error. 

An error occurred on the specified object of the specified component. 

[DTS.Pipeline] Error: The ProcessInput method on component "Derived Column 1" (5452) failed with error code 0xC0209029. The identified component returned an error from the ProcessInput method. 

The error is specific to the component, but the error is fatal and will cause the Data Flow task to stop running. 



Viewing all articles
Browse latest Browse all 24688

Trending Articles



<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>