title: How to calculate no. of days between two datetime column in SQL Server
body: <p>There are two tables, T1 includes start date column and T2 includes end date column. Both the columns have both date and time. </p>
  
  <p>T1 has all the rows unique while T2 can have multiple rows for same id and in all the row the end date column might be different (each row with different date and time). </p>
  
  <p>I want to calculate the difference (no. of days) between End date and the start date while keeping in mind that we have to only pick the last date which is lying in the End date column.</p>