Re: [R] How to convert SPSS date data to dates?

From: Chuck Cleland <ccleland_at_optonline.net>
Date: Fri 17 Feb 2006 - 04:49:48 EST

Here is one way:

library(chron)

as.chron(ISOdate(1582, 10, 14) + mydata$SPSSDATE)

Jonathan Williams wrote:
> Dear R Helpers,
>
> I have imported an SPSS file that contains date data.
> The data appear in R in a numeric format, as follows:
>
> 10485849600 10477641600 10561104000 10562745600 etc.
>
> I'd be extremely grateful if someone could tell me
> how to make these numbers into comprehensible dates!
>
> Thanks,
>
> Jonathan Williams
>
> ______________________________________________
> R-help@stat.math.ethz.ch mailing list
> https://stat.ethz.ch/mailman/listinfo/r-help
> PLEASE do read the posting guide! http://www.R-project.org/posting-guide.html
>

-- 
Chuck Cleland, Ph.D.
NDRI, Inc.
71 West 23rd Street, 8th floor
New York, NY 10010
tel: (212) 845-4495 (Tu, Th)
tel: (732) 452-1424 (M, W, F)
fax: (917) 438-0894

______________________________________________
R-help@stat.math.ethz.ch mailing list
https://stat.ethz.ch/mailman/listinfo/r-help
PLEASE do read the posting guide! http://www.R-project.org/posting-guide.html
Received on Fri Feb 17 04:56:58 2006

This archive was generated by hypermail 2.1.8 : Mon 20 Feb 2006 - 14:08:32 EST