Konvertieren Sie eine bisherige DateTime r
#Return "2021-01-20 20:11:59" as yyyy-mm-dd format
as_date("2021-01-20 20:11:59")
#> [1] "2021-01-20"
Kwams
#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")))