Bookmark and Share

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]

st: datetime different in Stata 12?


From   Skipper Seabold <[email protected]>
To   [email protected]
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–2018 StataCorp LLC   |   Terms of use   |   Privacy   |   Contact us   |   Site index