title: Excel VBA Script Format Date MM-DD-YYYY
body: <p>I'm need to convert the value of two cells from dd/mm/yyyy to mm-dd-yyyy and append the values to a stored procedure call. My code:</p>
  
  <pre><code>Dim dtInicio As String
  Dim dtFim As String
  Set stDate = CStr(MWS.Cells(1, "E").Value)
  Set enDate = CStr(MWS.Cells(2, "E").Value)
  </code></pre>
  
  <p>I need something like this after the above code:</p>
  
  <pre><code>wstring = "exec sp_accessFile '"+stDate+"', '"+enDate +"'
  </code></pre>