title: Compare two dates in vb.net whether they are equal or not
body: <p>I have a <strong>Date</strong> variable <code>startdt</code> and a <strong>String</strong> variable <code>hdnsdate</code>.</p>
  
  <p>Suppose if <code>startdt</code> has the value in the form <strong>3/1/2012</strong> and <code>hdnsdate</code> has the value in the form <strong>03/01/2012</strong>. Than how can i compare that these two dates are equal in <strong>vb.net</strong>.</p>
  
  <p>In <code>if</code> condition of my program i want to do this check. In case the two dates match move out of <code>if</code> loop otherwise go into the <code>if</code> loop.</p>
  
  <p>E.g A sample in C# what exactly i want.</p>
  
  <pre><code>if(startdt !=hdnsdate)
  {
   //Do
  }
  else
  {
  //Do this
  }
  </code></pre>