How to get the data row of a data table which is having the minimum value of one particular column

Hi All,

In my case I created a data table with ‘build data table’ activity and added some data.And its table structure will be as below.

Now I want to get the data row which is having the minimum value (but only positive) for Date difference column.

Thanks in Advance !!!

@SachiniJ

give a try on: yourdatatableVar.AsEnumerable().Where(Function (row) CInt(row(“DateDifference”)) > 0).OrderBy(Function (row) Cint(row(“DateDifference”))).First()

the return would be a datarow. It is recommended to implement some checks / handling the nor row returned case

Let us know your feedback

2 Likes

@ppr Thank you very much for your valuable support

This topic was automatically closed 3 days after the last reply. New replies are no longer allowed.