# Comparison between numbers

Good Morning,
I need a help,
Can make the comparison between several numbers and find the largest number ?

For example i have:
20190823
20190225
20190422

So i need extract the Max:20190823

Thank you very much

You may refer below post-

Hi @ShilpiJ, thank you for answering me.

I have one file excel with a lot of sheet with different name, so the all name are structured in this mode F0_20190215_122032 where

F0=is a static name
20190215= is a date
122032=is a hour

My finality is the Found the last sheet, so the max date with their hour.
I need to compaire the date and output the max number(date).

I attached my workflow where i’m read the sheet from file excel and split the name.

Thank you again
. Excel.xaml (16.6 KB)
Prova.xlsx (8.9 KB)

1 Like

@Viorica_Marga you can find out max date from your list of dates (after splitting) by using this-

ListDateSheets.Max(function(e) Convert.ToInt32(e))

1 Like

Hii Viorica_Marga,

You can accomplish this task by,

1.Get the workbook sheet names to a string list.
2. Sort the list in descending order.
assign sheets_list= sheets_list.OrderByDescending(Function(y) y).ToList
3.Now sheets_list(0) returns the maximum value, if ‘F0’ is a static string.

Best Regards,
Nimin

1 Like

Thank you very much

1 Like

Thank you very much for your time!!!

1 Like

@Viorica_Marga you can mark the post as solution

1 Like

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