title: VB - Difference between 2 dates
body: <p>I am trying to find the difference between two dates. The first of the two dates can be changed and when it is changed, the difference between the original dates has to be retained. This means that I have to automatically change the second date to have the same difference in days as it did before, but with a new first date. </p>
  
  <pre><code>Public Sub New()
  
      InitializeComponent()
  
      currDate = txt_ProjStart.Text
  
  End Sub
  
  Private Sub txt_ProjStart_TextChanged.....
  
  If txt_ProjEnd.Text.Length &gt; 0 Then
  
      Dim newDate As Date
      newDate = txt_ProjStart.Text
  
  
  
  
      Dim endDate As Date
      endDate = txt_ProjEnd.Text
  
  
  End If
  </code></pre>
  
  <p>I have the value of the old date1(currDate) and the new date1 value(newDate). I need to get the difference between these, and then add or minus these days from the endDate. </p>
  
  <p>Any help would be much appreciated! Thanks!</p>