title: VBA:Compare two date formats in vba
body: <p>How do we compare two date strings in vba, like "01.02.2013 &lt; 02/02/2013"?
  Whatever the dates are this always showing true. And two date formats are correct in the example i menioned.</p>
  
  <p>Below vba code throws error.</p>
  
  <pre><code>Sub aa()
  Dim a As Variant, b As Variant, c As Variant
  a = Format("1.2.2012", "DD\/MM\/YYYY")
  b = Format("2.2.2012", "DD\/MM\/YYYY")
  MsgBox (a)
  End Sub
  </code></pre>