as.numeric(as.POSIXct("20/10/2020", format="%d/%m/%Y"))
#Return "2021-01-20 20:11:59" in yyyy-mm-dd hh:mm:ss format.
ymd_hms("2021-01-20 20:11:59")
#> [1] "2021-01-20 20:11:59 UTC"
#Return "01/20/2021 08:01" in yyyy-mm-dd hh:mm format.
mdy_hm("01/20/2021 08:01")
#> [1] "2021-01-20 08:01:00 UTC"
#Return "2021-01-20 20:11:59" as yyyy-mm-dd format
as_date("2021-01-20 20:11:59")
#> [1] "2021-01-20"
df <- data.frame(lapply(df, function(x) as.Date(as.character(x), "%Y%m%d")))