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?
Assign string variable to all in groupI would like to assign a string variable to all in a group. I want to be able to assign "IA" if any …
Normalized cross-correlation with time-shiftDear all, I would like to perform normalized cross-correlation with time-shift to explore relations…
Trigonometric RegressionDear All, I want to do Trigonometric Regression to find the coefficient of cyclic variation to meas…
Checking for Missing Head of Houshold within a householdHello, I have a data set on household survey where the household size, member of the household numbe…
Using Ghostscript to Increase Resolution of GraphHello all, I am seeking to increase the resolution of a graph to 300 dpi for publication. While I'v…
Subscribe to:
Post Comments (Atom)
0 Response to Is there a way to format variable?
Post a Comment