Add below line instead of
DateTime dob = Convert.ToDateTime(d.ToString());
If you are entering string in dd/MM/yyyy then use below code else change accordingly.
DateTime dob = DateTime.ParseExact(d, "dd/MM/yyyy HH:mm:ss", CultureInfo.InvariantCulture);