I have data that looks like this:
id visit_date
1 12FEB2021
1 01JAN2018
2 08AUG2017
3 09MAY2013
3 10DEC2012
I want to convert "visit_date" to a date so that it looks like this:
id new_date
1 2/12/2021
1 1/1/2018
2 8/8/2017
3 5/9/2013
3 12/10/2012
These are 5 lines as an example, but there are close to 100 lines.
I'm new to R and I tried this, but the column "year" that's generated is blank.
df$new_date <- as.Date(df$visit_date, format = "%d_%m_%y")
Can someone help?