Hi,
Seems like a very basic question but I can find the basic function that extract the year from quarterly dates
Here is what I get when I try:
and I understand why...
I would have liked to use one of the commands "qofd" but I could not find the of for quarterly date ("invalid syntaxt"):
Is there any way beside converting to string and extract the date from string? Thanks!
Seems like a very basic question but I can find the basic function that extract the year from quarterly dates
Here is what I get when I try:
Code:
gen year = year(qyear)
Code:
qyear year 1986q2 1960 1986q3 1960 1986q4 1960 1987q1 1960 1987q2 1960 1987q3 1960 1987q4 1960 1988q1 1960 1988q2 1960 1988q3 1960 1988q4 1960 1989q1 1960 1989q2 1960 1989q3 1960 1989q4 1960 1990q1 1960 1990q2 1960 1990q3 1960 1990q4 1960 1991q1 1960 1991q2 1960 1991q3 1960 1991q4 1960 1992q1 1960 1992q2 1960 1992q3 1960
I would have liked to use one of the commands "qofd" but I could not find the of for quarterly date ("invalid syntaxt"):
Code:
gen year = yofq(qyear)
Comment