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 at the end of May, and its replacement, statalist.org is already up and running.


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

st: datetime different in Stata 12?


From   Skipper Seabold <jsseabold@gmail.com>
To   statalist@hsphsun2.harvard.edu
Subject   st: datetime different in Stata 12?
Date   Mon, 8 Oct 2012 12:07:59 -0400

Can anyone confirm that what's listed here [1] is correct for version
12? I'm using Stata 11.2 and I'm not getting this. Am I doing
something wrong? According to the docs, the datetime/c listing should
be

20jan2010 09:15:22.120

In 11.2 I get

19nov2006 23:13:20

What changed? Seems a bit too big to be leap years and leap seconds.
Perhaps it's just a mistake?

Similarly, the datetime/C value is not this either.

set obs 1
generate double datetime_c = 1479597200000 in 1
format datetime_c %tc

Now if I do

clear
set obs1
generate double datetime_c = tc(20jan2010 09:15:22.120) in 1

I get

1579598122120

Surely the behavior of something so fundamental didn't change between
11.2 and 12.

Thanks,

Skipper

[1] http://www.stata.com/help.cgi?datetime#s2
*
*   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