On Aug 22, 2007, at 2:14 PM, Sergiy Radyakin wrote:
I am working with Stata 9.2 and I need to get today's day, month
and year.
<snip>
(I want the compiled [Mata] code to access current date, not the
date when it was compiled).
: stata("version")
version 9.2
: printf("%d", date(st_global("c(current_date)"),"dmy"))
22aug2007
: day(date(st_global("c(current_date)"),"dmy"))
22
: month(date(st_global("c(current_date)"),"dmy"))
8
: year(date(st_global("c(current_date)"),"dmy"))
2007
-- Phil
*
* 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/