Good day, i imported some data into R from Excel.  By using the edit()
function, this is what one of the dates looks like in R:

> x <- structure(1254351600, class = c("POSIXt", "POSIXct"), tzone = "")
[1] "2009-10-01 BST"

However, when i do the following, the date changes:

> as.Date(x, formate="%Y-%m-%d" )
[1] "2009-09-30"

I don't understand why this is happening. I realise that i can get
around this by doing as.Date(as.character(x)), but would be nice to
understand why it doesn't work directly.

C xx

______________________________________________
R-help@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.

Reply via email to