I'm creating a SQL string in an expression to populate a table including population of a datetime field with the value of the container start time in an ssis package. Problem is I'm having to convert the system::containerstarttime variable to a string so that it can be appended to the rest of the SQL string text. The date then goes in as '18/04/2012 09:05:23'. Using this value in my insert sql statement results in the following error:
The conversion of a varchar data type to a datetime data type resulted in an out-of-range value.
How can I get this date in to a datetime field please?