[R] Serial Date

Raoni Rosa Rodrigues raonirosa at yahoo.com.br
Wed Mar 16 04:42:41 CET 2011


Hello Mr. Grothendieck, 

thanks for your reply!

Text book that I use (Spector, 2008) dind't comment about this feature of chron function... 

I just don't understand why we have 10957 days of difference between dates (look that date on your mail seems to be 1981, not 2011), and not the 25568 days expected due the difference in origin: 1/1/1900 of excel against 1/1/1970 of chron package.

Best,

Raoni




--- Em ter, 15/3/11, Gabor Grothendieck <ggrothendieck at gmail.com> escreveu:

> De: Gabor Grothendieck <ggrothendieck at gmail.com>
> Assunto: Re: [R] Serial Date
> Para: "Raoni Rosa Rodrigues" <raonirosa at yahoo.com.br>
> Cc: "R Help" <r-help at r-project.org>
> Data: Terça-feira, 15 de Março de 2011, 11:24
> On Sun, Mar 13, 2011 at 10:00 PM,
> Raoni Rosa Rodrigues
> <raonirosa at yahoo.com.br>
> wrote:
> > Hello R Help,
> >
> > I'm working in a project with a software that register
> date and time data in serial time format. This format is
> used by excel, for exemple. In this format, 40597.3911423958
> is 2011/2/23 09:23:15. First part is number os days since
> 1900/1/1, and second part is a fraction of a day.
> >
> 
> Try this:
> 
> > library(chron)
> > chron(40597.3911423958)
> [1] (02/24/81 09:23:15)
> 
> See R News 4/1 and the references there.
> 
> -- 
> Statistics & Software Consulting
> GKX Group, GKX Associates Inc.
> tel: 1-877-GKX-GROUP
> email: ggrothendieck at gmail.com
> 






More information about the R-help mailing list