Dear Stata community,
I have a variable stored as dates in the Stata format i.e 01jul1993 (I converted them from string into the correct format). However
I know want to create a new variable which organises the observations according to whether the date was pre or post 31dec1996. what would be the best command to use please? I have tried reading the manual in reference to dates/ times but I could find anything that helps with generating new variable according to the date.
Many thanks for your help,
Roshani
Related Posts with generating new variable based on date variable
Can I use PPML to run a long-difference regression?Dear Statalisters, I want to know whether I can estimate a long-difference regression using PPML. …
graph bar problem.Dear All, i have this data set. Code: * Example generated by -dataex-. For more info, type help dat…
Aggregating several variables with some missing observationsHello Statalisters, I am creating an index with several made up of several indicators and some of t…
Combination Name Across Unique IdentifiersHi Everyone, I am working with a datset that has following variables: 1) mrn: unique identifier 2)…
Break , Exit or clear nothing is working on stata 17 maybe because of a complex codingCould anyone help me to find a solution if none of - break , exit or clear doesn't work on stata 17 …
Subscribe to:
Post Comments (Atom)
0 Response to generating new variable based on date variable
Post a Comment