I have a date vector like this
date <- c("01jan2020", "04mar2020", "20dec2020")
and I want to separate it with - following the next pattern (after the first 2 digits and after the first 5 digits):
date_transform1 <- c("01-jan-2020", "04-mar-2020", "20-dec-2020")
Next I want to convert the first letter of the month into a capital letter:
date_transform2 <- c("01-Jan-2020", "04-Mar-2020", "20-Dec-2020")
Any clue?
Regards