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, statalist.org is already up and running.


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

st: Formatting months error


From   "Paul O'Brien" <paul.obrien@afe2.org.uk>
To   statalist <statalist@hsphsun2.harvard.edu>
Subject   st: Formatting months error
Date   Thu, 7 Mar 2013 10:41:14 +0000

Hi,

I cannot find the bit in the manuals that sorts this out for me. I get the wrong month when I format for month with %tm.

. gen date=18628

. format date %td

. l

     +-----------+
     |      date |
     |-----------|
  1. | 01jan2011 |
     +-----------+

. format date %tm

. l

     +--------+
     |   date |
     |--------|
  1. | 3512m5 |
     +--------+

What am I doing wrong?

Paul










*
*   For searches and help try:
*   http://www.stata.com/help.cgi?search
*   http://www.stata.com/support/faqs/resources/statalist-faq/
*   http://www.ats.ucla.edu/stat/stata/


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