I have a column in which time is in the following format: 0815A. I need it to be converted into a time format.
I have tried poxscit
but there are some errors.
I have a column in which time is in the following format: 0815A. I need it to be converted into a time format.
I have tried poxscit
but there are some errors.
We can use as.POSIXct
specifying the correct format
as.POSIXct(paste0(v1, "M"), format = '%I%M%p')
#[1] "2016-07-27 08:15:00 IST" "2016-07-27 21:20:00 IST"
v1 <- c("0815A", "0920P")