Hi Statalist,
I am fairly new to Stata and this forum. I appreciate any help.
My current data has three columns. The first column functions as ID and the second and third columns are two date in %tm format (Please see attached screenshot).
I would like to generate a new variable MonthYear and make this data into a panel. MonthYear is the month between date in column 2 and column 3. For example, the final data should have 60 rows for A01. The MonthYear variable will be 1997m4 for the first row, 1997m5 for the second row, ..., and 2002m4 for the last row.

Thank you very much.
I am fairly new to Stata and this forum. I appreciate any help.
My current data has three columns. The first column functions as ID and the second and third columns are two date in %tm format (Please see attached screenshot).
I would like to generate a new variable MonthYear and make this data into a panel. MonthYear is the month between date in column 2 and column 3. For example, the final data should have 60 rows for A01. The MonthYear variable will be 1997m4 for the first row, 1997m5 for the second row, ..., and 2002m4 for the last row.
Thank you very much.
Comment