Stata The Stata listserver
[Date Prev][Date Next][Thread Prev][Thread Next][Date index][Thread index]

st: dates


From   Ulrich Kohler <kohler@wz-berlin.de>
To   statalist@hsphsun2.harvard.edu
Subject   st: dates
Date   Thu, 21 Aug 2003 12:10:18 +0200

hi all,

I have two  questions on elapsed dates:

The mdy()-function returns the elapsed date, counting from January 1 1960.

. display mdy(1,1,1960)
0

. display mdy(1,2,1960)
1

. display mdy(12,24,100)
-678993

However 

. display mdy(12,24,99)

returns a missing value, as does

. display mdy(12,24,00)
.

What is the reason that mdy() returns missing with 2 digit years ( to prevent 
the user from using two digit years?)

The second question is just for curiosity. Is there any reason for using the 
January 1 1960 as zero? It seems quite common in software programs, but why?

Uli

--
kohler@wz-berlin.de

*
*   For searches and help try:
*   http://www.stata.com/support/faqs/res/findit.html
*   http://www.stata.com/support/statalist/faq
*   http://www.ats.ucla.edu/stat/stata/



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