mcbootus
15 years agoContributor
Sorting multiple lists by a list item
Dear all,
I have 5 lists which are formatted identically and the third item in each list is a date and time. Like so:
myList1 [1,4,12MAR2011T14:33,4,6]
myList2 [3,2,12MAR2011T14:20,4,6]
myList3 [2,7,16JUN2011T14:42,4,6]
myList4 [5,1,21MAR2011T18:20,4,6]
myList5 [6,5,09MAR2011T14:20,4,6]
What would be the easiest way to contain these lists in an array and then reorder the lists by date so the output would be:
myList5 [6,5,09MAR2011T14:20,4,6]
myList2 [3,2,12MAR2011T14:20,4,6]
myList1 [1,4,12MAR2011T14:33,4,6]
myList4 [5,1,21MAR2011T18:20,4,6]
myList3 [2,7,16JUN2011T14:42,4,6]
Many thanks in advance,
Armen
I have 5 lists which are formatted identically and the third item in each list is a date and time. Like so:
myList1 [1,4,12MAR2011T14:33,4,6]
myList2 [3,2,12MAR2011T14:20,4,6]
myList3 [2,7,16JUN2011T14:42,4,6]
myList4 [5,1,21MAR2011T18:20,4,6]
myList5 [6,5,09MAR2011T14:20,4,6]
What would be the easiest way to contain these lists in an array and then reorder the lists by date so the output would be:
myList5 [6,5,09MAR2011T14:20,4,6]
myList2 [3,2,12MAR2011T14:20,4,6]
myList1 [1,4,12MAR2011T14:33,4,6]
myList4 [5,1,21MAR2011T18:20,4,6]
myList3 [2,7,16JUN2011T14:42,4,6]
Many thanks in advance,
Armen
