Suppose I look at the date March 5th:
> temp <- as.Date("05-Mar-2021", "%d-%b-%Y")
> temp
[1] "2021-03-05"
> tibble(temp)
# A tibble: 1 x 1
temp
<date>
1 2021-03-05
Note that the tibble correctly says it's a date. Now I want a different format.
> temp <- format(as.Date("05-Mar-2021", "%d-%b-%Y"), "%d-%b-%Y")
> temp
[1] "05-Mar-2021"
> tibble(temp)
# A tibble: 1 x 1
temp
<chr>
1 05-Mar-2021
Notice this is a character. Is there a way I can get the tibble to still be of class Date (<date> in the tibble) but to print in the format 05-Mar-2021?
Thanks!