Reading mdy_hms AM/PM off excel into r
问题 I am using dplyr and lubridate. I am using read_excel to export a data.frame into R from excel. In Excel, I have a column that consists of mdy_hms AM or PM. In R, my code consists of: df$dateTimeEtc And this prints out as an example: "2017-03-07 11:10:37 UTC" "2017-03-22 10:04:42 UTC" "2017-03-08 09:36:49 UTC" However, I have tried to use: df <- df %>% mutate(dateTimeEtc = mdy_hms(dateTimeEtc)) So that R recognizes these data points in a mdy_hms (not sure what to do to include the AM/PM)