I have a large dataset with character values that look like dates but they're in two different formats. For example:
input <- c("2019-01-22", "2019-04-17", "05/17/2009", "05/17/2010", "05/17/2015", "2019-07-30")
How would I change "05/17/2009", "05/17/2010", "05/17/2015" (anything else in this format) into the same "%Y-%m-%d" format as the others in the list? I also want to convert everything into a date.
The problem I have is that the placement of the year, month, and day are different so I can't just rplace "/" with a "-".