LINQ Query Specific Data Retrieval

Hi @Ishan_Shelke1 ,

Try the Below Expression :

dt.AsEnumerable.Where(Function(row) CDate(row(dateColumnName).ToString).Date.ToString("dd-MM-yyyy").Contains(date1) andAlso Not(row("Patch Status").ToString.Trim.Equals("Cancelled"))).CopyToDataTable

Would also like to Suggest to Convert the Filtered Rows to an Array instead of using .CopyToDatatable.

Check the Below Post for Converting to List of DataRows and Convert to Datatable: