----- Original Message -----
From: "Ed Bassin, Ph.D." <[email protected]>
To: <[email protected]>
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/