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) format. However, this line of code converts all my data points into NA. Ideally I'd rather R read these data points as ONLY mdy so I can make comparisons with other mdy data points.
Another goal is to find the max and min data points in this column.
Thanks in Advance