title: Stata: Number of Months between Two Dates
body: <p>I want to create a variable that gives the number of months between the two daily date variables in my data set (end_date and start_date). I want to count the month of the start date if it is the 1st day of the month and similarly, I want to count the month of the end date if it is the last day of the month.</p>
  <p>For example, let's say that the start_date is 01feb2010 and end_date is 12jun2010. I want to count February and the months between February and June but not the month June. So, 4 months in total.</p>