Helpful for when a date object needs to be printed or stored in a SQL database, since SQL databases do not (always) support date-time classes used in R.
Examples
df <- iris
df$dates <- Sys.Date() + sample(1:1000, size = nrow(iris))
converted_df <- date_cols_to_char(df)
# the date variable is now converted, while all other columns are unchanged:
sapply(converted_df, class)
#> Sepal.Length Sepal.Width Petal.Length Petal.Width Species dates
#> "numeric" "numeric" "numeric" "numeric" "factor" "character"