title: vb.net System.IFormatProvider runtime error
body: <p>I have this function in vb.net:</p>
  
  <pre><code>Function GetFirstDayOfMonth(ByVal dtDate As DateTime) As DateTime
          Dim dtFrom As DateTime = dtDate
          dtFrom = dtFrom.AddDays(-(dtFrom.Day - 1))
          Return dtFrom
  End Function
  </code></pre>
  
  <p>I am then calling it here:</p>
  
  <p>GetFirstDayOfMonth(reader3.GetString(3).ToString("yyyy-MM-dd"))</p>
  
  <p>I have checked the value of <code>reader3.GetString(3)</code> using a <code>MsgBox</code> and it equals</p>
  
  <pre><code>2015-02-23
  </code></pre>
  
  <p>But i am getting a runtime error saying:</p>
  
  <pre><code>Additional information: Unable to cast object of type 'System.String' to type 'System.IFormatProvider'.
  </code></pre>