title: Number of months between two dates SAS
body: <p>I Have bunch of data points data that looks like this. Sample:</p>
  
  <pre><code>        Date_1              Date_2
     10FEB2010:00:00:00      02/07/08
     10FEB2010:00:00:00      03/10/08
     10FEB2010:00:00:00      04/07/08
     24MAY2010:00:00:00      05/09/08      
     24MAY2010:00:00:00      06/11/08      
     24MAY2010:00:00:00      07/11/08
  </code></pre>
  
  <p>I would like to index both dates from the beginning of the month, then get the number of months in between in a new column called "month_from." I would like to add the new column "month_from" to my sample data set so it looks like this:</p>
  
  <pre><code>       Date_1              Date_2      month_from
     10FEB2010:00:00:00      02/07/08       -24
     10FEB2010:00:00:00      03/10/08       -23  
     10FEB2010:00:00:00      04/07/08       -22
     24MAY2010:00:00:00      05/09/08       -24
     24MAY2010:00:00:00      06/11/08       -23
     24MAY2010:00:00:00      07/11/08       -22
  </code></pre>
  
  <p>my initial attempt is: </p>
  
  <pre><code> month_from=intck('month.1','Date_1'd,'Date_2'd);
  </code></pre>
  
  <p>Am I using the correct function? </p>
  
  <p>How about adding variable "month_from" to sample data set?</p>