Hi,
I'm trying to merge two dates variables from the same dataset, but I would like to prioritize one on the other:
considering date1 and date2
I would like to generate date3 = date1, except if date1 is missing, then replacing by date2
I tried :
gen date3 = date1
replace date3 = date2 if date 1 == "."
but I got a type mismatch message, even if my variables are all in numeric daily date (float)
I hope I'm clear and someone can help me,
Many thanks
El
Ps: Merry Christmas!
Related Posts with Merging dates
How to create bottom 26% of the populationHi, I have been using thus far xtile quin=mpce[aw=weight], n(5) to create bottom 20% of the populat…
Installing python packagesDear all, I'm having trouble installing python packages in stata 16 (numpy and pandas) using my mac…
Unique frequency table from repeated category variablesHi !, I have three category variables (credit_provider_1,_2,_3) generated over the number of "loans"…
Looping certain commands?Evening everyone! I was wondering if it's possible to write a loop for the alpha command? Code: l…
short panel data ( micro panel)Hello, I am sorry for the long post. I am trying do a research on evaluating the performance of stoc…
Subscribe to:
Post Comments (Atom)
0 Response to Merging dates
Post a Comment