I have a time in excel that when converter to R, comes as a character and looks someting like this 0.59658.
I am trying to convert to POSIXct but it returns as a POSIXct with NA.
teste <- as.POSIXct(test, format = "%H:%M")
I've also tried teste <- as.POSIXct(test, format = "%H:%M:%S")
For other columns it works fine, but not this one..
UPDATE: I've done the solution, but a second problem comes with the rest of the thing that I need.
teste <- as.POSIXct(teste*24*60*60,"%H%M", origin="1970-01-01")
teste <- format(as.POSIXct(teste, format = "%Y-%m-%d %H:%M:%S"), format="%H:%M")
And now, I want to paste with a date vector that is a POSIXct in the 2013-01-06, with this command:
teste<-as.POSIXct(paste(date, teste), format="%Y-%m-%d %H:%M:%S")
And the NA are back