I want to convert a date column that has the following format 21 Septiembre 2019 into 21/09/2019 I have used parse_date_time but I keep getting an error.
Code I a am using
This is the object that contains the dates
STM_silla_2$date
STM_silla_2$date <- parse_date_time(x=STM_silla_2$date, orders = c("dBY", "dBy"))
```
I get the following error. Could it be because the package does not recognize the months in Spanish?
All formats failed to parse. No formats found
Here is some data sample
dput(STM_silla_2$date[1:5])
c(" 26 Septiembre 2016 ", " 06 Septiembre 2012 ", " 25 Octubre 2013 ", " 07 Septiembre 2015"," 19 Noviembre 2014 ")
I have also tried dmy() from :lubridate without results.
Set your locale to Spanish and then convert to
DateAfter that
lubridate::dmywould work as well