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
Creating Fixed effectHey, i have a panel data, i need to add a Race_grade fixed effect and i have two separate variables …
Create a continuous variable for blood pressure using two variablesDear List, I wonder if any of you know how to make a continuous blood pressure variable from two va…
Using asdoc to export two-sample t-test by groups and other summary statisticsHi, I would like to export summary statistics (two sample t-test of the difference of the two group…
Multilevel modeling- testing further the cross-level interaction terms after mnbregHi, I I highly appreciate any help in probing the significant cross-level interaction terms in this …
mnsp command to execute R in StataHello, I'd like to estimate propensity scores for multiple treatments and try to use the mnps comma…
Subscribe to:
Post Comments (Atom)
0 Response to Rearranging individual dates within a varlist
Post a Comment