Error Input string was not in a correct format?

sorry try this

DT_Detail.AsEnumerable().Where(function(z) not z("APAPDT").ToString.Equals("") and not z("PAID_DATE").ToString.Equals("")).CopyToDataTable().AsEnumerable().Where(Function(w) Convert.ToInt32(w("APAPDT").ToString.Trim) >= startDatePeriod And 
Convert.ToInt32(w("APAPDT").ToString.Trim) <= endDatePeriod And 
Convert.ToInt32(w("PAID_DATE").ToString.Trim) >= startDatePeriod And 
Convert.ToInt32(w("PAID_DATE").ToString.Trim) <= endDatePeriod).CopyToDataTable()
2 Likes