Hi, I'm extremely new to Stata (5 weeks) and am stuck with something my lecturer has asked us to do. I have to use a string variable recording a date to create a date formatted variable which I did as such:
generate Date_Variable = date(originaldatevariable, "MDY")
However I noticed that for all the dates before 1900 the date is recorded in the format Y-M-D as opposed to the rest which are M/D/Y. So all these observations come up as missing values in the new date variable. I have zero idea how to deal with this problem with the very limited knowledge I have as we hadn't even learned about dates before starting this assignment any help would be much appreciated.
I'm using Stata 16, and for the life of me can't find any ways to do this online that I understand.
Related Posts with Rearranging individual dates within a varlist
How to split?Dear All, I have this data set, Code: * Example generated by -dataex-. To install: ssc install data…
panel data with three variablesHi everybody. I have a panel data with three variables: year, country, product. I want to run a log…
inquire foreach listI find that Code: foreach x in Gold Platinum_upgrade Platinum_upgrade_merit { in fact, there is no…
inquire about capture commandI see a data code that starts: Code: clear * capture cd "~/Dropbox/Projects/The Demand for Status/…
Is ROC curve for 3x3 table possible?Dear All, I have a confusing doubt in my mind. ROC curve for 3x3 or 2X3 table is possible? If so, 1.…
Subscribe to:
Post Comments (Atom)
0 Response to Rearranging individual dates within a varlist
Post a Comment