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

Re: st: minor annoyance

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

duh.  Good point; thanks!


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

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:
Nicholas Winter                                 434.924.6994 t
Assistant Professor                             434.924.3359 f
Department of Politics         e
University of Virginia w
PO Box 400787, 100 Cabell Hall
Charlottesville, VA 22904

*   For searches and help try:

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