Reputation: 423
I was studying the cheat-sheet and other ressources, however I always found examples using lubridate
from tidyverse
putting me the result date into the format Y-M-D
For example having in the raw data the following:
01.06.2016
whhich says First July of 2016 and running:
Date.last.Contact = lubridate::dmy(Date.last.Contact)
giving me 2016-06-01
I just want the german format like 01-06-2016. I have to mutate it into date-format to calculate the minimal date od some datarows in my r-script. I was looking for a parameter where I can specify the output format, however I did not find the hint.
Upvotes: 0
Views: 281
Reputation: 8117
You want
format(ymd(20200102), "%d.%m.%Y")
output:
"02.01.2020"
It is simply about the way you format the output string that is create from the date vector.
Upvotes: 1