[R] Serial Date

Gabor Grothendieck ggrothendieck at gmail.com
Tue Mar 15 15:34:08 CET 2011


On Tue, Mar 15, 2011 at 10:24 AM, Gabor Grothendieck
<ggrothendieck at gmail.com> wrote:
> 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.

Also note that you can adjust it by one day like this:

> chron(40597.3911423958) - 1
[1] (02/23/81 09:23:15)



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