I have a need to store dates as strings and can't seem to find an easy way to do this. I was not able to find any suggestions online or in the statalist (either old or new). Any advice?
********* BEGIN ************
clear all
input str9 date_text1
"28mar2008"
"25jan2000"
"19nov2003"
"25aug2005"
"09feb2010"
end
g date=date(date_text1,"DMY")
format date %td
*the part I do not know how to do
* this is what I thought would work
tostring date, g(date_text2) format(%td) //but it does not work
list
********** END **********
Thanks,
Ben Hoen
LBNL
********* BEGIN ************
clear all
input str9 date_text1
"28mar2008"
"25jan2000"
"19nov2003"
"25aug2005"
"09feb2010"
end
g date=date(date_text1,"DMY")
format date %td
*the part I do not know how to do
* this is what I thought would work
tostring date, g(date_text2) format(%td) //but it does not work
list
********** END **********
Thanks,
Ben Hoen
LBNL
Comment