Statalist


[Date Prev][Date Next][Thread Prev][Thread Next][Date index][Thread index]

Re: st: minor annoyance


From   Phil Schumm <[email protected]>
To   [email protected]
Subject   Re: st: minor annoyance
Date   Thu, 7 Aug 2008 13:42:35 -0500

On Aug 7, 2008, at 1:28 PM, Nick Winter wrote:
If you are doing this, even better would be to include the following in profile.do

global today date("\`c(current_date)'","DMY")

Note the backslash before the open-single-quote (`), which means the global macro contains the literal string `c(current_date)' which is evaluated every time the global is called, rather than containing the value of c(current_date) at the time you assign the global.

Technically, you don't even need the macro expansion characters here:

    global today date(c(current_date),"DMY")

will do just fine.


-- Phil

*
*   For searches and help try:
*   http://www.stata.com/help.cgi?search
*   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