Sort dates output in IEnumerable<Match>

how to sort dates output in IEnumerable ? thanks

@AhmedKutraphali - Please shows us your input and workflow screenshot…that would help us in understanding the problem better…

for example the output of matches are dates , order by ascending. @prasath17

03/23/2022
03/22/2022
03/25/2022

@AhmedKutraphali - You can try like this…

ArrItems = YourIEnumerableVariable.Select(Function (x) x.tostring).toArray

And then Using Invoke method activity…

1 Like

how to sort on accending

Hei,

you can use: yourIEnumerable.OrderBy(Function(x) DateTime.Parse(x.Value))

If “Match” is System.Text.RegularExpressions.Match

Regards, Giovanni

1 Like

IEnRegex does not exists @prasath17

@AhmedKutraphali - That is your Output Regex variable(assuming you are using Regex to extract the dates)…

For Ascending…just use Reverse in the MethodName

1 Like

Hi,

Can you try the following?

listStr = result.Select(Function(m) m.Value).OrderBy(Function(s) DateTime.Parse(s)).ToList()

Regards,

2 Likes

do we have a c# expression equivalent on this one ? @Yoichi ?

in c#:

listStr = result.OrderBy(x => DateTime.Parse(x.Value)).ToList()

1 Like

Hi,

list = res.Select(m=>m.Value).OrderBy(s=>DateTime.Parse(s)).ToList();

Regards,

1 Like

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