Statalist


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

Re: st: minor annoyance


From   Nick Winter <[email protected]>
To   [email protected]
Subject   Re: st: minor annoyance
Date   Thu, 07 Aug 2008 14:46:06 -0400

duh.  Good point; thanks!

Nick

Phil Schumm wrote:
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/
--
--------------------------------------------------------------
Nicholas Winter                                 434.924.6994 t
Assistant Professor                             434.924.3359 f
Department of Politics                  [email protected] e
University of Virginia          faculty.virginia.edu/nwinter w
PO Box 400787, 100 Cabell Hall
Charlottesville, VA 22904

*
*   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