Notice: On April 23, 2014, Statalist moved from an email list to a forum, based at statalist.org.
From | Nick Cox <njcoxstata@gmail.com> |
To | "statalist@hsphsun2.harvard.edu" <statalist@hsphsun2.harvard.edu> |
Subject | Re: st: Fwd: changing the format of the current date |
Date | Wed, 22 May 2013 19:59:59 +0100 |
di %dCY_N_D date("`c(current_date)'", "DMY") That could be the one-line heart of a program program currdate version 9 di %dCY_N_D date("`c(current_date)'", "DMY") end Nick Nick njcoxstata@gmail.com On 22 May 2013 19:44, Melanie Leis <melanieleis@gmail.com> wrote: > Hello, > > Is there a way to change the format of the automated date in c(current_date)? > > The automatic format is 22 May 2013 > > I would like to get something that looks like 2013 05 22 > > Any suggestions on how to do this would be greatly appreciated, > > Thanks! > > Melanie > * > * For searches and help try: > * http://www.stata.com/help.cgi?search > * http://www.stata.com/support/faqs/resources/statalist-faq/ > * http://www.ats.ucla.edu/stat/stata/ * * For searches and help try: * http://www.stata.com/help.cgi?search * http://www.stata.com/support/faqs/resources/statalist-faq/ * http://www.ats.ucla.edu/stat/stata/