Stata The Stata listserver
[Date Prev][Date Next][Thread Prev][Thread Next][Date index][Thread index]

st: Re: Today in a log file


From   Friedrich Huebler <[email protected]>
To   [email protected]
Subject   st: Re: Today in a log file
Date   Mon, 3 May 2004 14:38:30 -0700 (PDT)

local date=c(current_date)
log using "`path'\logs\progamlog `date'.smcl", replace

Friedrich Huebler

--- "Rio, Martin" <[email protected]> wrote:
> Is there a way to reference "today"'s date in Stata, where "today"
> is the
> current day based either on the computer's clock or some Stata
> clock? 
> 
> The reason why I wonder this is that I frequently run a code that
> saves its
> log in a log folder, and I would like to have each log file called
> differently to automatically keep previous logs. It would be nice
> to be able
> to replace the statement:
> 
> log using "`path'\logs\programlog.smcl", replace
> 
> with:
> 
> log using "`path'\logs\progamlog [today].smcl", replace
> 
> where [today] would be a function that returns today's date so that
> it
> becomes part of the log's file name.
> 
> Other suggestions that achieve the same purpose are also welcome.
> 
> Thanks in advance for any help.
> 
> Mart�n Rio
> Charles River Associates
> Washington, DC 
> phone:	(202) 662-3957
> fax:	(202) 662-3910


	
		
__________________________________
Do you Yahoo!?
Win a $20,000 Career Makeover at Yahoo! HotJobs  
http://hotjobs.sweepstakes.yahoo.com/careermakeover 
*
*   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/



© Copyright 1996–2024 StataCorp LLC   |   Terms of use   |   Privacy   |   Contact us   |   What's new   |   Site index