Re: [R] How to convert Datetime numbers from Excel to POSIXt objects

2007-12-14 Thread Rolf Fankhauser
Ok, I see, the difference comes from summer and winter time. Thanks for the hint! Stupid not to bear that in mind!! Peter Dalgaard wrote: >Rolf Fankhauser wrote: > > >>Hi all, >> >>I need to compare time series data files of different time formats. I >>had no problems with text format using s

Re: [R] How to convert Datetime numbers from Excel to POSIXt objects

2007-12-14 Thread Gabor Grothendieck
Since you are getting the date times from Excel clearly you don't need time zones, etc. so you can use chron. See R News 4/1 for more. > library(chron) > dd <- c(t0 = "30.12.1899 00:00:00", t1 = "3.7.1981 09:00:00", + t2 = "3.7.1981 00:00:00", t3 = "1.7.1981 00:00:00", t4 = "1.1.1981 00:00:00")

Re: [R] How to convert Datetime numbers from Excel to POSIXt objects

2007-12-14 Thread Peter Dalgaard
Rolf Fankhauser wrote: > Hi all, > > I need to compare time series data files of different time formats. I > had no problems with text format using strptime. > But how can I convert datetime numbers from Excel (days since 30.12.1899 > 00:00:00) into POSIXt objects? > For example 29770.375 should

[R] How to convert Datetime numbers from Excel to POSIXt objects

2007-12-14 Thread Rolf Fankhauser
Hi all, I need to compare time series data files of different time formats. I had no problems with text format using strptime. But how can I convert datetime numbers from Excel (days since 30.12.1899 00:00:00) into POSIXt objects? For example 29770.375 should be converted to "03.07.1981 09:00:0