Hi!
I am very new to STATA. I have seen you answer different questions regarding date-variables. Hopefully you can help me with this:
I want to merge two variables:
v1=numeric yyyymmdd variable
v2=string yyyy-mm-dd variable
-->
newdatevariable=v1
replace newdatevariable=v2
if v2<v1 or missing(v1)
Kind regards,
Jenna Najar
Related Posts with Create a new variable based on a date string variable yyyy-mm-dd and a numeric variable (yyyymmdd)
Help converting time series data to panel dataDear Members, I hope you could help me with the following problem, I have an dataset which contains…
High coefficients with xtlogitDear All, I m running the command xtlogit, re vce(robust) for my model since my dependent variable …
Export estimation output of a system regression (reg3)Dear statalist, I estimated a system equation, which contains 14 equations, by command -reg3- then,…
How do I find for a certain value (numeric/string) in one variable if there exists a value (numeric/string) in another variable??My dataset look similar to this Id MathBaseline. WPMBaseline. NepaliBaseline MathPost WPMPost Nepal…
Invalid syntax; not obvious what is wrong.Dear All, I have a 7 year state panel of US states: Code: Code: * Example generated by -dataex-. …
Subscribe to:
Post Comments (Atom)
0 Response to Create a new variable based on a date string variable yyyy-mm-dd and a numeric variable (yyyymmdd)
Post a Comment