Thanks much
RY
Robert A. Yaffee, Ph.D.
Research Professor
Shirley M. Ehrenkranz
School of Social Work
New York University
home address:
Apt 19-W
2100 Linwood Ave.
Fort Lee, NJ
07024-3171
Phone: 201-242-3824
Fax: 201-242-3825
[email protected]
----- Original Message -----
From: Phil Schumm <[email protected]>
Date: Saturday, May 27, 2006 10:26 pm
Subject: Re: st: Current date and time listed in output
> On May 27, 2006, at 8:41 PM, Robert A Yaffee wrote:
> > Does anyone know how I can get the current date and time to be
> > reported in the output of an rclass program that one has written?
>
> > What is the function for reporting the current date and time at
> > which the program was run on Stata?
>
>
> I'm not sure exactly what you're asking for. If you are writing a
> program and want to display and/or return the time at which the
> program is executed, you can use the following:
>
>
> program foo, rclass
> return local datetime = "`c(current_date)' `c(current_time)'"
> di as text return(datetime)
> // rest of program
> end
>
>
> which produces
>
>
> . foo
> 27 May 2006 21:24:26
>
> . ret li
>
> macros:
> r(datetime) : "27 May 2006 21:24:26"
>
>
> -- 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/
>
*
* 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/