title: Calculate number of nights between 2 DateTimes
body: <p>I have a start DateTime and an end DateTime and need to calculate the number of nights (not days) between the two with a default/minimum value being 1.</p>
  
  <p>I've got</p>
  
  <pre><code>int NumberOfDays = Convert.ToInt32((EndDateTime - StartDateTime).Days)
  </code></pre>
  
  <p>Which returns the number of days so is always over by 1. I'm not sure that subtracting 1 from the result is an appropriate solution.</p>
  
  <p>I have also tried </p>
  
  <pre><code>int NumberOfDays = Convert.ToInt32((EndDateTime - StartDateTime).ToDays)
  </code></pre>
  
  <p>Which also returns the same result.</p>
  
  <p>Is there a smarter solution other than subtracting 1 every time and making sure it never returns a 0?</p>