Dear Community,
I encounter a problem when merging two files. In the first file date is displayed as double e.g. 30sep2021. In the second file I have only years and quarters in float in format %tq, e.g. 2021q3. I would like to convert the date in the first file to quarter year format. I scanned the article https://www.stata-journal.com/articl...article=dm0098 in search for the answer. However, I'm not successful. I type for the first file:
gen t=dofc(date)
Then I wanted to type:
format t %tq
But I realised that my t is 0. So stata treats e.g 31dec2017 as 1960:/
I encounter a problem when merging two files. In the first file date is displayed as double e.g. 30sep2021. In the second file I have only years and quarters in float in format %tq, e.g. 2021q3. I would like to convert the date in the first file to quarter year format. I scanned the article https://www.stata-journal.com/articl...article=dm0098 in search for the answer. However, I'm not successful. I type for the first file:
gen t=dofc(date)
Then I wanted to type:
format t %tq
But I realised that my t is 0. So stata treats e.g 31dec2017 as 1960:/
Comment