title: Why won't this CDATE format to mm/yyyy?
body: <p>I want to convert a string <em>"mm/dd/yy hh:mm AM/PM"</em> to a date <em>"mm/yyyy"</em>  </p>
  
  <p>Why is the following code outputting <code>11-2-2015</code>?</p>
  
  <pre><code>Sub Test()
  
      Dim yourStringDate As String
      Dim yourDateVariable As Date
  
      yourStringDate = "11/2/15 12:00 AM"        
      yourDateVariable = Format(CDate(yourStringDate), "mm/yyyy")        
      MsgBox yourDateVariable
  
  End Sub
  </code></pre>