date_format()
formats a date (Date) or date-time (POSIXct/POSIXlt) using
a format
string.
There are separate help pages for formatting dates and date-times:
Examples
# See method specific documentation for more examples
x <- as.Date("2019-01-01")
date_format(x, format = "year: %Y, month: %m, day: %d")
#> [1] "year: 2019, month: 01, day: 01"