I am working a dataset which has a Date column currently stored as Character, below is the format of how the dates are:
31/12/00
01/01/01
I want to change the year part from "00" to "2000" and "01" to "2001" for the whole column and want it in date format.
How can I do it?
I tried doing the following way
if(y2k_clean$Date[7:8] == "00")
replace(y2k_clean$Date, 7, "2000")
I also tried to achieve this with gsub()
but could not get the result I wanted.
Thank you.