Re: [R] Importing dates from SPSS file

2011-02-04 Thread dunner
as.POSIXlt(book$DATE, origin="1582/10/14") works. The Gregorian calendar was the kicker, thanks to ggrothendieck at gmail.com Ross -- View this message in context: http://r.789695.n4.nabble.com/Importing-dates-from-SPSS-file-tp3260293p3260329.html Sent from the R help mailing list archive at

Re: [R] Importing dates from SPSS file

2011-02-04 Thread Gabor Grothendieck
On Fri, Feb 4, 2011 at 9:47 AM, dunner wrote: > > Hello all, kind regards, > > I have imported a data.frame from SPSS using "foreign":read.spss but > unfortunately it is reading dates in a way neither R nor myself can > understand. > >> book$DATE >  [1] 13502246400 13443321600 13477795200 13472956

Re: [R] Importing dates from SPSS file

2011-02-04 Thread jim holtman
What do the dates look like in the original file? On Fri, Feb 4, 2011 at 9:47 AM, dunner wrote: > > Hello all, kind regards, > > I have imported a data.frame from SPSS using "foreign":read.spss but > unfortunately it is reading dates in a way neither R nor myself can > understand. > >> book$DATE

[R] Importing dates from SPSS file

2011-02-04 Thread dunner
Hello all, kind regards, I have imported a data.frame from SPSS using "foreign":read.spss but unfortunately it is reading dates in a way neither R nor myself can understand. > book$DATE [1] 13502246400 13443321600 13477795200 13472956800 13501728000 13445395200 13501382400 13502851200 134441856