I have a dataset that has a variable date_of_birth (MM-YYYY). I would like to change this format to DD-MM-YYYY by creating random DD for each observation.
df1 <- as.Date(paste0(df,"01/",MMYYYY),format="%d-%m-%Y")
I have a dataset that has a variable date_of_birth (MM-YYYY). I would like to change this format to DD-MM-YYYY by creating random DD for each observation.
df1 <- as.Date(paste0(df,"01/",MMYYYY),format="%d-%m-%Y")