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
New version of parmest on SSCThanks once again to Kit Baum, new version of the parmest package (superseding last week's version) …
Intuition for including a quadratic variable in a fixed effects regression modelHi everyone, I was facing a question regarding the intention for including a quadratic variable in …
Robust command for logit - Stata 16Hi, I tried the command roblogit for robust check in logit regression, but it is not recognized. Whi…
Carryforward/backwardDear all, I have this panel data (I'm giving the example only about one company) Code: * Example …
Total factor productivity using micro-level cross-sectional datasetDear STATA community, I want to generate following TFP series using STATA for a cross-sectional dat…
Subscribe to:
Post Comments (Atom)
0 Response to 8 character date
Post a Comment