Dear members
I have the following date: 12-Dec-15 and would like to convert it to numerical so I can great a dummy variable equal to one if the data is less than 12-Dec-15 and zero otherwise.
What’s the right code to convert the data so I can use to create the dummy variable?
thanks for your help
Related Posts with How to convert a date into numerical for subtraction
Strategy to choose the right controls? Conceptual questionsHello, I have a problem with chosing the right controls for my model and hope someone can help me a…
Generate with tempfilesI used Stata tempfile code from one of the earlier posts to append multiple years of NHIS mortality …
Looking for examples of OSIRIS dictionaries and dataDear Statalisters, I am writing a custom converter of data from OSIRIS dictionaries and need exampl…
Generate a new variable by deleting everything after certain character ("/") Code: * Example generated by -dataex-. To install: ssc install dataex clear input str28 country "U…
Is there a way to rename large number of variables with a single command? (Details)I have a ton of variables, for example, var1_m, var2_m, var3_m, etc. I want to turn them into var1_2…
Subscribe to:
Post Comments (Atom)
0 Response to How to convert a date into numerical for subtraction
Post a Comment