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