Hello friends,
I am currently using data that has one variable that shows the value of the date, for example, a variable named effective_date shows the value 20120105 means 2012-January-5th. If I only need the value of year (for my analysis purpose, as I need to create an arrival cohort based on years, not the exact date).
Right now I recode it like (20120000/20129999 = 2012), It works, but I am curious is there a way to formate variable just show the first four digitals instead of recoding it?
Please advise
Thanks
Related Posts with Is there a way to format variable?
Labeling Scatter plot in twowayDear all, I have a problem labeling plot using twoway command. I am plotting scatter with line of …
Grab UNCTAD dataStata has a handy package Code: wbopendata to get World Bank's World Development Indicators data …
Defining logit dependent variableHi...perhaps you or someone can help me...I want to run a panel logit crisis model and not sure how …
append to fileI am sure I am missing something basic here... I want to save the memory data to a file like Code:…
Pooled OLS and Panel Data AnalysisHello everyone, My question is rather simple but since i am very new to econometrics I am strugglin…
Subscribe to:
Post Comments (Atom)
0 Response to Is there a way to format variable?
Post a Comment