title: VBA creating date with strings
body: <p>I'm trying to do simple tasks with date type but what I'm getting is not what I want. I would like to Split some cell value with delimiter and return string values to DateValue method. </p>
  
  <p>My code </p>
  
  <pre><code>Dim str2() As String
  str2() = Split(Cells(ActiveCell.Row, 7).Value, ".")
  
  Dim date1 As Date
  date1 = DateValue(str(0) &amp; "-" + str(1) &amp; "-" &amp; str(2))
  </code></pre>
  
  <p>What I'm trying to do is getting some specific date format. Date in the cell is formated like this : 26.05.14 (day.month.year) and I want to have format like this 2014-05-26(year-month-day). That's all. 
  DateValue method returs me a date 2000-01-02.
  I don't knwo how can I look into the str2() array to see what values are there after Split method. How can I do that ?</p>
  
  <p>It seems VBA is completely different from VB.NET ... I'm not experienced with VBA. 
  Thanks</p>