Notice: On April 23, 2014, Statalist moved from an email list to a forum, based at statalist.org.
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: st: ym() date function is acting strangely
From
Richard Williams <[email protected]>
To
[email protected]
Subject
Re: st: ym() date function is acting strangely
Date
Thu, 15 Dec 2011 16:54:34 -0500
At 04:34 PM 12/15/2011, Gabi Huiber wrote:
I do this:
clear
set obs 10
gen year=2010
gen month=_n
gen date1=ym(year, month)
format date1 %tm
And I get this:
year month date1
2010 1 23aug1961
2010 2 24aug1961
2010 3 25aug1961
2010 4 26aug1961
2010 5 27aug1961
2010 6 28aug1961
2010 7 29aug1961
2010 8 30aug1961
2010 9 31aug1961
2010 10 01sep1961
How on Earth is that possible? A minute ago ym() was working fine, I swear.
I can't replicate. I assume your Stata is up to date?
-------------------------------------------
Richard Williams, Notre Dame Dept of Sociology
OFFICE: (574)631-6668, (574)631-6463
HOME: (574)289-5227
EMAIL: [email protected]
WWW: http://www.nd.edu/~rwilliam
*
* 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/