I have a array of strings {“2022-02-16”, “2022-04-15”, “2022-03-13”} i want to be able to compare these dates and return the latest date, in this case it would be “2022-04-15” then i want to be able to identify the index of this result within the array so in this case the index would be 1.
Or you can convert it to list sort and reverse. Then the first element of that list would be date you are looking for. After that index of that element in array would be the one that you are looking for.
This solution will work if the format of the date will be the same as you showed in the example.