Unable to convert character to dates
head(lbw) State_Name Birth_Date LMP birthWt M_Age 1 Chandigarh 6/9/24 9/8/23 2.5 10 2 Jharkhand 4/12/24 7/2/23 2.5 10 3 Jharkhand 6/10/24 9/5/23 2.5 10 4 Jharkhand 5/5/24 8/17/23 2.5 10 5 Jharkhand 6/21/24 9/15/23 2.5 10 6 Punjab 6/6/24 9/6/23 2.5 10
lbw$Birth_Date <-as.date(mdy(lbw$Birth_Date)) Error in as.date(mdy(lbw$Birth_Date)) : could not find function "as.date"
#also tried this code
lbw$Birth_Date <-as.date(lbw$Birth_Date, "%m/%d/%y") Error in as.date(lbw$Birth_Date, "%m/%d/%y") : could not find function "as.date"
Don't know where the problem is! Any inputs will be helpful.