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]

RE: st: change default date base (1 jan 1960)


From   Nick Cox <n.j.cox@durham.ac.uk>
To   "'statalist@hsphsun2.harvard.edu'" <statalist@hsphsun2.harvard.edu>
Subject   RE: st: change default date base (1 jan 1960)
Date   Wed, 11 Jul 2012 11:40:13 +0100

Daily dates. 

. di mdy(1,1,1900)
-21914

. di mdy(1,1,1960) - mdy(1,1,1900)
21914

As said, you may need to adjust slightly depending on exactly what you want, e.g. in your other stuff is 1 January 1900 day 0 or day 1? 

Nick 
n.j.cox@durham.ac.uk 

Daniel Ciganda

Thanks Nick, but what exactly should I substract mdy(1,1,1900) from?

On Tue, Jul 10, 2012 at 3:45 PM, Nick Cox <njcoxstata@gmail.com> wrote:
> Not as such. Just subtract mdy(1,1,1900) and if necessary adjust
> according to whether you want 1 Jan 1900 to be 0 or 1.
>
> On Tue, Jul 10, 2012 at 2:37 PM, Daniel Ciganda <dciganda@gmail.com> wrote:
>
>> Is there a way to change the default origin date from 1st Jan 1960 to,
>> for example, 1st Jan 1900.

*
*   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/


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