I want to compare the date and get result as per the condition,
Input Data:
Condition 1) StartDate is less than or equal to current date and enddate is Greater than current date.
Condition 2) End date is less than today/current date.
(From r In DT
Where DateTime.Parse(r("StartDate").toString).Date.tostring("dd-MM-yyyy")<=Today.Date.tostring("dd-MM-yyyy") And
DateTime.Parse(r("End Date").toString).Date.tostring("dd-MM-yyyy") >Today.Date.tostring("dd-MM-yyyy")
Select r).CopyToDataTable
condition 2
(From r In DT
Where DateTime.Parse(r("End Date").toString).Date.tostring("dd-MM-yyyy")<Today.Date.tostring("dd-MM-yyyy")
Select r).CopyToDataTable
Can check this, getting an error of string not recorgnised as valida date format
(From r In DT
Where DateTime.ParseExact(r(“EndDate”).toString, “dd/MM/yyyy”, System.Globalization.CultureInfo.InvariantCulture) < Today
Select r).count
(From r In DT
Where DateTime.ParseExact(r(“EndDate”).toString, “dd/MM/yyyy”, System.Globalization.CultureInfo.InvariantCulture) < Today
Select r).copytodatatable