# Sorting a Multidimensional Array by the date(03.11.04)

**URL:** <https://forum.kirupa.com/t/sorting-a-multidimensional-array-by-the-date-03-11-04/45132>\
**Category:** flash\
**Created:** [March 11, 2004, 8:13am UTC](https://forum.kirupa.com/t/sorting-a-multidimensional-array-by-the-date-03-11-04/45132 "2004-03-11T08:13:41Z")\
**Posts on this page:** 1\
**Page:** 1

<div class="post-metadata">

**Author:** ![waffe](https://avatars.discourse-cdn.com/v4/letter/w/c37758/32.png) [@waffe](https://forum.kirupa.com/u/waffe)\
**Post date:** [March 11, 2004, 8:13am UTC](https://forum.kirupa.com/t/sorting-a-multidimensional-array-by-the-date-03-11-04/45132/1 "2004-03-11T08:13:41Z")

</div>

Hi,

I need a sort function that will read data from an array and sort it by the date - first to last. The date format is (03.11.01) which seems to make it a bit more complex to sort.

Here is my code for loading data into flash via loadVars:

```auto

Concert_file = new LoadVars();
Concert_fileURL = "http://www.domain.com/concert_data.txt";
Concert_file.load(Concert_fileURL);
Concert_file.onLoad = function(success) {
	if (success) {
		ConcertArray = new Array();
		for (i=0; i<this.NUMITEMS; i++) {
		var cDate = eval("this.cDate"+i);
		var cVenue = eval("this.cVenue"+i);
		var cCity = eval("this.cCity"+i);
		var cWith = eval("this.cWith"+i);
		var cInfo = eval("this.cInfo"+i);
		arrayMonth = cDate;
		arrayMonth = arrayMonth.substr(0, 2);
			if (arrayMonth != undefined) {
                    ConcertArray* = [cInfo, cWith, cCity, cVenue, cDate];
			}
		}
	}
};

```

This is the txt file loadVars loaded:

```auto

&cDate7=06.08.04&cVenue7=T Joes&cCity7=Mil, WI&
&cDate8=08.13.04&cVenue8=400bar&cCity8=Min, MN&
&cDate9=07.08.04&cVenue9=T Joes&cCity9=Mil, WI&

```

I have tried many things and no real results to show. I get lost at the Multidimensional Array part being loaded from loadVars. I see myself parseing the date out of the array and then run the custom sort, but…

Any ideas would be 😃

Thanks
