Using SSIS, how do you read a datetime field into a variable that is of Data Type string?

Posted by Mark Kadlec on Stack Overflow See other posts from Stack Overflow or by Mark Kadlec
Published on 2010-05-14T18:33:46Z Indexed on 2010/05/14 19:24 UTC
Read the original article Hit count: 173

Filed under:
|

This one has bugged me for the longest time and a great question to ask the Stackoverflow users I think.

I have a rather large SSIS flow that uses a string variable to store the datetime. I would now like to dynamically read the datetime value from the database, but how would you construct the SSIS to do this?

My first obvious thought would be to simply execute a SQL task to get the datetime and store it in the variable, but got the "differs from the current variable type" error.

Is there a simple way to convert the database datetime into a String variable?

Any help from the community would be appreciated,

© Stack Overflow or respective owner

Related posts about ssis

Related posts about datatype