[R] Convert number to Date

Rolf Turner r.turner at auckland.ac.nz
Thu Mar 25 21:36:22 CET 2010


On 26/03/2010, at 9:33 AM, anna wrote:

> 
> Hello, I have a date value in excel: 1/4/2010 which in number format gives me
> 40182. When I read this with read.xls from R I get same 40182 so what I do
> is that I use the as.Date() function but here is what the as.Date() function
> returns me:
>> as.Date(40182)
> [1] "2080-01-06"
> Why don't I get the same thing as in excel?

Because excel is a load of junk.

	cheers,

		Rolf Turner
######################################################################
Attention: 
This e-mail message is privileged and confidential. If you are not the 
intended recipient please delete the message and notify the sender. 
Any views or opinions presented are solely those of the author.

This e-mail has been scanned and cleared by MailMarshal 
www.marshalsoftware.com
######################################################################



More information about the R-help mailing list