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

st: Re: Obtaining save date of data file


From   "Scott Merryman" <smerryman@kc.rr.com>
To   <statalist@hsphsun2.harvard.edu>
Subject   st: Re: Obtaining save date of data file
Date   Fri, 13 Dec 2002 17:50:30 -0600

----- Original Message ----- 
From: "Ed Bassin, Ph.D." <edbassin@profsoft-health.com>
To: <statalist@hsphsun2.harvard.edu>
Sent: Friday, December 13, 2002 5:13 PM
Subject: st: Obtaining save date of data file


> Is there a way to programmatically obtain the date that a file was last
> saved and store that information in a macro?  I need to compare two files
> and make sure that file B is newer than file A.  I would like to obtain the
> information displayed in describe and store that in a macro.  It is not one
> of the listed returns.  The only solution I have been able to come up with
> involves creating a log file, running a describe statement on the dataset,
> closing the log file, reading the log file using the file command, going to
> the appropriate row and column of the file, and taking a substring to put
> the date into memory.  There's got to be a better way!
> 
The macro S_FNDATE contains the date and time the file was last saved.

See [P] macro system and [U] 21.3.10

Scott

*
*   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–2014 StataCorp LP   |   Terms of use   |   Privacy   |   Contact us   |   What's new   |   Site index