I am merging two datasets and need to standardize how the dates appear. From searching another forum I was able to figure out how to remove a leading zero using this
mutate(new_column = str_remove(old_column, "^0+"))
however I am still stuck with these zeros after a /, for example 9/01/2010. I want to make it read as 9/1/2010.
Or, if there is a way to go from 09/01/2010 to 9/1/2010 that would be ideal. I tried to accomplish that by using this
mutate(new_column = as.Date(old_column, format = "%m/%d/%y")) but for some reason, that turned all of the years into 2020.