2021-02-25

Stata: Number of Months between Two Dates

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.

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.



from Recent Questions - Stack Overflow https://ift.tt/2MlNIEj
https://ift.tt/eA8V8J

No comments:

Post a Comment