String: "12/27/2020 00:00:00"
I'd like this to be formatted as a date. Tried:
library(lubridate)
parse_date_time('12/27/2020 00:00:00', mdy)
Error in as.character(x) :
cannot coerce type 'closure' to vector of type 'character'
Then tried:
mdy('12/27/2020 00:00:00')
[1] NA
Warning message:
All formats failed to parse. No formats found.
Then tried:
as_date('12/27/2020 00:00:00')
[1] NA
Warning message:
All formats failed to parse. No formats found.
How can I turn this string into a date?