I'm reading in a date time column from Excel into R yet when converting to POSXIct and using the origin 1970-01-01 only converts to date time in 1970. Same with the lubridate package using the origin as lubridate=orgin. Any thoughts on how to remedy this?
the xlsx package works fine but for some reason the openxlsx does not.
test2 <- read.xlsx (FN, sheet = 3, startRow = 35, cols = 1:77)
test2$dt <- as.POSIXct(test2$DateTime, origin="1970-01-01")
DateTime reads in from excel as numeric and 43306.29 should be 7-25-2018 7:00:00 after conversion to POSXIct format but is 1970-01-01 05:01:46
test2$DateTim[1:2]
andclass(test2$DateTim)
? – Sonny