title: Month difference between two dates in sql server
body: <p>Please refer the below examples and kindly let me know your ideas.</p>
  
  <pre><code>declare @EmployeeStartDate datetime='01-Sep-2013'
  declare @EmployeeEndDate datetime='15-Nov-2013'
  select DateDiff(mm,@EmployeeStartDate, DateAdd(mm, 1,@EmployeeEndDate)) 
  </code></pre>
  
  <p>Output = <code>3</code>
  expected output = <code>2.5</code></p>
  
  <p>Since I have only 15 days in Nov, So I should get <code>0.5</code> for Nov</p>