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
Restructuring data (removing rows with blanks) - Cumulative returnsHi Statalister, I have a problem related to cumulative returns, I have a return series from 01-01-2…
Winsorizing before or after long-transformationDear users, I have a question regarding the handling of outliers in a log-log regression framework.…
Stata commands on data imputationsHello everyone, I am dealing with a panel data set for 27 EU countries. I have the data for farmers…
keep if a variable is one of many values?I'm wondering whether there is a simple way to keep observations only if a variable is equal to one …
Margins Beta regressionDear Statalisters, I am running a regression with proportions as dependent variable. In the beta re…
Subscribe to:
Post Comments (Atom)
0 Response to 8 character date
Post a Comment