[R] Importing dates from SPSS file

jim holtman jholtman at gmail.com
Fri Feb 4 15:53:45 CET 2011


What do the dates look like in the original file?

On Fri, Feb 4, 2011 at 9:47 AM, dunner <ross.dunne at tcd.ie> 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 13472956800 13501728000 13445395200
> 13501382400 13502851200 13444185600 13461465600 13457232000
> [12] 13458096000 13432435200 13431484800 13495334400 13491964800 13451184000
> 13490755200 13505616000 13505616000 13502851200 13436928000
> [23] 13497408000 13465094400 13484707200 13447555200 13438483200 13464489600
> 13494816000 13432435200 13455676800 13463884800 13455417600
> [34] 13478400000 13504665600 13490150400 13504060800 13471401600 13492915200
> 13465958400 13445136000
>
> I have looked around the documentation but can find nothing similar there or
> in Spector's chapter on Dates
>
> How do I coerce these to %d%m%Y form?
>
> Thank you for your time and patience
>
> Ross Dunne
> ross.dunne at tcd.ie
>
>
> --
> View this message in context: http://r.789695.n4.nabble.com/Importing-dates-from-SPSS-file-tp3260293p3260293.html
> Sent from the R help mailing list archive at Nabble.com.
>
> ______________________________________________
> R-help at r-project.org mailing list
> https://stat.ethz.ch/mailman/listinfo/r-help
> PLEASE do read the posting guide http://www.R-project.org/posting-guide.html
> and provide commented, minimal, self-contained, reproducible code.
>



-- 
Jim Holtman
Data Munger Guru

What is the problem that you are trying to solve?



More information about the R-help mailing list