Dear Community,
I struggle with converting string date variables. I downloaded data on quarterly GDP from OECD in csv. The date is displayed as variable time e.g. : 2000-Q1 and it is string.
What I wanna have is 2000q1 in double. I tried the command:
gen t=date(time, "YQ")
However Stata generated missing values denoted as: .
My second idea was the command:
gen t=qofd(quarterly(time,"YQ"))
In this case Stata generated missing values as well.
Please help me. I'm searching through the stata manuals but I'm not successful
I struggle with converting string date variables. I downloaded data on quarterly GDP from OECD in csv. The date is displayed as variable time e.g. : 2000-Q1 and it is string.
What I wanna have is 2000q1 in double. I tried the command:
gen t=date(time, "YQ")
However Stata generated missing values denoted as: .
My second idea was the command:
gen t=qofd(quarterly(time,"YQ"))
In this case Stata generated missing values as well.
Please help me. I'm searching through the stata manuals but I'm not successful

Comment