I am trying to convert this time stamp to POSIXct
t1 <- c("19-Jun-13 06.00.00.00 PM")
If I do this:
t1 <- as.POSIXct(t1, format="%d-%b-%y %H:%M:%S")
whould this convert this time stamp right? Does that considder the AM/PM at the end?
Read ?strptime
. %p
, which only works with %I
, not %H
. Your time format is also incorrect. Your times are separated by "."
, not ":"
.
as.POSIXct("19-Jun-13 06.00.00.00 PM", format="%d-%b-%y %I.%M.%OS %p")
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With