title: Calculation of month between 2 dates by year
body: <p>Need help in understanding on how to Calculate the months by year between 2 dates , able to calculate months between the dates but not by year </p>
  
  <pre><code>ID  StartDate   Enddate
  1   1/1/2016    4/23/2019
  2   1/1/2016    4/30/2017
  3   1/1/2016    12/31/2018
  4   1/1/2017    4/23/2019
  5   5/20/2017   11/30/2017
  
  
  
  ID  StartDate   Enddate        2016 2017  2018  2019
  1   1/1/2016    4/23/2019        12   12    12     4
  2   1/1/2016    4/30/2017        12    4     0     0
  3   1/1/2016    12/31/2018       12   12    12     0
  4   1/1/2017    4/23/2019         0   12    12     4
  5   5/20/2017   11/30/2017        0    7     0     0
  </code></pre>