title: SSIS Convert numeric to datetime
body: <p>I'm trying to convert a numeric column with the following defined format: <code>DDMMYYYY</code>
  to a datetime in a mssql database.</p>
  
  <p>What I tried is to do this with a "<em>derive column</em>".</p>
  
  <p>My idea was to get the year, month and day part as strings, concatenate them and convert them to a DT_DBTIMESTAMP with the following code:</p>
  
  <pre><code>(DT_DBTIMESTAMP)(SUBSTRING((DT_WSTR,8)[field],5,4) + "-" + SUBSTRING((DT_WSTR,8)[field],3,2) + "-" + SUBSTRING((DT_WSTR,8)[field],1,2))
  </code></pre>
  
  <p>I also tried to do it with <code>DT_DBDATE</code> but it didn't work either.</p>
  
  <p>The column of my table looks like this: <code>[GebDat] datetime</code></p>
  
  <p>Do you have any idea how I can achieve this result? 
  Or maybe give me a hint, what I was doing wrong in the above approach?</p>
  
  <p>Thanks in advance</p>