title: SSIS - Converting unformatted strings dates to YYYY-MM-DD
body: <p>I'm trying to convert the string column <code>[mydate]</code> to a date, and I would like to use the <code>Derived Column Transformation</code>. The problem is this that my dates are like <code>'1/10/2015'</code>, <code>'1/1/2015'</code>, <code>'11/1/2015'</code> and <code>'11/9/2015'</code>. So the format can change between <code>D/MM/YYYY</code>, <code>D/M/YYYY</code>, <code>DD/M/YYYY</code>, and <code>DD/MM/YYYY</code>.</p>
  
  <p>Can you guide me in creating the expression for the <code>Derived Column Transformation</code>?</p>
  
  <p>I tried to use something like this:</p>
  
  <pre><code>(DT_DATE)(ISNULL([mydate]) ==  FALSE  ? (RIGHT([mydate],4) + "-" + "2" + "-" + LEFT([mydate],1)) : [mydate])
  </code></pre>