Hi STATA Dndee,
what didn't you like about Nick's answer? He gave you the line
-gen var1n = date("15/" + var1, "DMY")-
to achieve your goal in Stata 10. For earlier versions of Stata, it
would be "dmy", I believe. Add
-format var1n %td-
to format the new date variable as a date (i.e. 15jun2005), since you
probably don't want to see 16602 in your output. All of this is well
explained in the help files and manuals.
Regards,
Eva
2008/4/10, STATA Dndee <[email protected]>:
> Hi
> I haven't received answer to my previous question.
> Could anyone please help me with one of the questions?
>
> Var1- Storage type str8, display format 0.9s. It has
> month and year only like: 06/2005 .
> I want to 1-change the format to time, 2- add day
> dd/mm/yyyy, and 3- set dd for 15 like say: 15/05/2005.
> Your help is very much appreciated.
> Regards
>
>
> ___________________________________________________________
> Yahoo! For Good helps you make a difference
>
> http://uk.promotions.yahoo.com/forgood/
>
> *
> * For searches and help try:
> * http://www.stata.com/support/faqs/res/findit.html
> * http://www.stata.com/support/statalist/faq
> * http://www.ats.ucla.edu/stat/stata/
>
*
* For searches and help try:
* http://www.stata.com/support/faqs/res/findit.html
* http://www.stata.com/support/statalist/faq
* http://www.ats.ucla.edu/stat/stata/