Hello, I'm trying to merge two datasets using a variable called sur_mon_yr that is month/year. E.g. 01/2010
When merging by sur_mon_yr, there is no match.
I suspect this is because one dataset has sur_mon_yr in %tmNN/CCYY format whereas the other dataset uses %tdNN/CCYY format.
I tried changing the format of the variables to match but it's not working.
For example, if %tdNN/CCYY is changed to %tmNN/CCYY, the observation changes from 01/2010 to 01/3497.
On the other hand, if %tmNN/CCYY is changed to %tdNN/CCYY, the observation changes from 01/2020 to 08/1961.
I'm not sure how to get the two sur_mon_yr variables to have the same format such that they can merge and match.
Many thanks for your help,
Harry
Related Posts with Date format question
Graph optionsArray Dear Stata users, I am wondering is it possible to control the size of the second label (num…
conditional logit modelHello I am trying to use conditional logit model in order to see why people go to a specific neighbo…
Instrumental variableDear all, I will appreciate your help on this. I have an independent variable which I suspect to be…
Delta method toHello I am using stata 14 and the mixlogit command (user install) to analyse data from a discrete c…
Splitting wordsHi Everyone, Bellow an example of the data I have. I need to use only the cities "City" and drop "C…
Subscribe to:
Post Comments (Atom)
0 Response to Date format question
Post a Comment