How to change American format dates and / m / d to d / m / y in a dataframe in R?

2

I have a dataframe where dates are in American format and I would like to know how I can turn this column into the Brazilian day-month-year format.

I have tried the lubridate package and the dmy function, but for some reason it is not running.

    
asked by anonymous 27.08.2018 / 20:27

1 answer

3

The dmy function converts only dates in day / month / year format. Note that the Date column has, in addition to the date, a time. Use the dmy_hms function, where hms means hour, minute, and second, respectively.

    
27.08.2018 / 20:53