title: How to get a date field from MM/dd/yyyy to yyyy/MM/dd in vb.net
body: <p>I need to get a date field from MM/dd/yyyy to yyyy/MM/dd in vb.net but it should still be a date field afterward so that I can match it against a date in  a database.</p>
  
  <p>At the moment all I'm managing to do is to change it to a string in that format.</p>
  
  <p>I tried this type of code which also did not work.</p>
  
  <pre><code> DateTime.Parse(yourDataAsAString).ToString("yyyy-MM-dd")
   fromDeString = String.Format("{0:yyyy/MM/dd}", aDate)
   fromDate = Format("{0:yyyy/MM/dd}", aDate)
  </code></pre>
  
  <p>Any help would be much apreciated, thanks</p>