Filtering data1

Also we can simplify and optimize the statement:

Shortening the statement by namespace import:
RegexImport

Avoiding startdate parsing for each loop by using a variable:

Assign Activity =
StartDate | DataType: DateTime =

Datetime.ParseExact(formattedstartdate,"dd-MM-yyyy", Cultureinfo.InvariantCulture)

Assign Activity:
Result | List(Of DataRow) =

(From d in dtstatement.AsEnumerable().
Let dp = Datetime.ParseExact(d("Closed Date").ToString.Trim(), "dd-MM-yyyy",Cultureinfo.InvariantCulture)
Where dp.Date < StartDate.Date
Select r=d).ToList()

If Activtiy: Result.Any()
Then …
Else …

As described in the firstAid

About LINQ:
[HowTo] LINQ (VB.Net) Learning Catalogue - Help / Something Else - UiPath Community Forum