Hi,
I need an 8 character date in order to use the "estudy" package (it's for the "evdate" option).
When i format my date using below command, it shows the date i want in the data editor, but when i highlight the cell and look at the value bar, it displays 9 characters.
format %tdNNDDCCYY eventdate
In short, i need dates stored as 03032006 (which is 8 characters) instead of 03mar2006 (which is 9 characters).
I have tried illustrating the problem in the below image. As you can see, i have also tried to format the variable as a string and then manually replacing all the month names using below command, but "estudy" only accepts date variables.
replace eventstring = subinstr(eventstring,"jan","01",.)
replace eventstring = subinstr(eventstring,"feb","02",.)
etc..
Any advice?
Array
Related Posts with 8 character date
Longitudinal administrative health data - flag claimants who received the same treatment accross all observationsGreetings, I have a longitudinal administrative health dataset consisting of over 400,000 observati…
How to combine difference in difference with propensity score matching and NN matchingDear Statalisters, I am running a difference in difference and I was wondering what should I code i…
looking at the mean of one variable across another variableWithin stata i have data on the consumption of 10 different alcohol types. Another variable is the r…
XTSUM2DOCX: Report summary statistics of panel data to a Word tableDear all, The user-written Stata command xtsum2docx is now available on SSC, thanks to Professor Ch…
Handling of missing quality information in admetanHi David, When I run the QE model in admetan with missing quality information it still runs and pro…
Subscribe to:
Post Comments (Atom)
0 Response to 8 character date
Post a Comment