Hi, I am struggling a bit with dates in Stata. I have a variables that has the form (199103, 199106, 199109, 199112, 199203, 199206....). The variable period represents the date for my quarterly data. The first four digits are the year and the last two digits are the quarter. I want to convert the variable to the format 1991q1, 1991q2, 199q3, 1991q4 and so on). Then, to tell Stata that it represents a date variable.

Initially, the code
results in periods being converted to a variable that looks exactly the same for all entries (e.g. 2.0e+05 )

Can anyone help in that please?

Thanks and Happy new year to you all.

Lisa

Initially, the code

Code:

format periods %tq

Can anyone help in that please?

Thanks and Happy new year to you all.

Lisa

## Comment