title: How to calculate number of days between two dates
body: <p>I have two input dates taking from Date Picker control. I have selected start date 2/2/2012 and end date 2/7/2012. I have written following code for that.</p>
  
  <p>I should get result as 6 but I am getting 5.</p>
  
  <pre><code>function SetDays(invoker) {   
      var start = $find('&lt;%=StartWebDatePicker.ClientID%&gt;').get_value();
      var end = $find('&lt;%=EndWebDatePicker.ClientID%&gt;').get_value();
  
      var oneDay=1000 * 60 * 60 * 24;
      var difference_ms = Math.abs(end.getTime() - start.getTime())
      var diffValue = Math.round(difference_ms / oneDay);
  }
  </code></pre>
  
  <p>Can anyone tell me how I can get exact difference?</p>