Bookmark and Share

Notice: On March 31, it was announced that Statalist is moving from an email list to a forum. The old list will shut down on April 23, and its replacement, is already up and running.

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: st: date formatting

From   Phil Schumm <>
Subject   Re: st: date formatting
Date   Tue, 12 Oct 2010 16:22:37 -0500

On Oct 12, 2010, at 4:13 PM, Phil Schumm wrote:
    gen t2 = cond(_n<=185705, date(t,"DMY"), date(t,"MDY"))

On Oct 12, 2010, at 4:14 PM, Nick Cox wrote:
gen date = cond(_n <= 185705, date(t, "dmy"), date(t, "mdy"))

Nick is correct -- I've grown so used to the new syntax for -date()-, I'd forgotten that it used to be different.

-- Phil

*   For searches and help try:

© Copyright 1996–2016 StataCorp LP   |   Terms of use   |   Privacy   |   Contact us   |   Site index