title: Compare the Days of Two Dates
body: <p>I'm using ASP.NET, C# and SQL Server. In the database the date is: <code>2014-10-28</code>. Just year, month and day, no time portion.</p>
  
  <p>I have this code: </p>
  
  <pre><code>  DateTime data1 = new DateTime();
    DateTime data2 = DateTime.Now;
  
    data1 = reader.GetDateTime(3);
  
    double total= (data2 - data1).TotalDays;
    Response.Write(total.ToString());
  </code></pre>
  
  <p>The only problem of this is the output. The output of this is "4,81351624131366". Because probably this is the difference of the hours. Its possible to set the data2 to give me just the Y,M and D?</p>
  
  <p>Or convert the total into days?</p>