title: Vb.net Current Date minus Date
body: <p>lets say that my date is:</p>
  
  <pre><code>    Dim theDate As DateTime = DateTime.ParseExact("2013-04-10 21:34 PM", "yyyy-MM-dd HH:mm tt", CultureInfo.InvariantCulture)
  </code></pre>
  
  <p><br>
  im using this format:</p>
  
  <pre><code>"yyyy-MM-dd HH:mm tt"
  </code></pre>
  
  <p>i want to get the current date and do somthing like:</p>
  
  <pre><code>Dim theDate As DateTime = DateTime.ParseExact("2013-04-10 21:34 PM", "yyyy-MM-dd HH:mm tt", CultureInfo.InvariantCulture)
  Dim currentTime As System.DateTime = System.DateTime.Now
  dim Result as new datetime
  Result = currentTime.Date - theDate
  </code></pre>
  
  <p>Update:</p>
  
  <p>i tried:</p>
  
  <pre><code>Dim currentTime As System.DateTime = System.DateTime.Now
  Dim date1 As New System.DateTime(2013, 4, 10, 21, 34, 10)
  Dim date2 As New System.DateTime(currentTime.Year, currentTime.Month, currentTime.Day, currentTime.Hour, currentTime.Minute, currentTime.Second)
  Dim diff1 As System.TimeSpan
  diff1 = date2.Subtract(date1)
  MsgBox(diff1.ToString)
  </code></pre>