Formatting my array ....
Posted: Wed Oct 08, 2008 5:51 am
Hi,
I have a massive array containing dates. This array is unsorted and there are lots of duplicates. I need to create a report that displays this array as a kind of histogram based on number of occurences (how many of each date). For example in the array I have:
2007-06-22
2007-06-23
2007-06-23
2007-06-23
2007-06-24
2007-06-24
I want to format this information so it looks like below:
2007-06-22 1
2007-06-23 3
2007-06-24 2
The dates in the array are in no particularly order and I would also like to format the results so they are in date order. I then want to use the number of occurence data to create a line graph but need to get to this stage first. Can anyone advise the best way to do this?
Thanks
James
I have a massive array containing dates. This array is unsorted and there are lots of duplicates. I need to create a report that displays this array as a kind of histogram based on number of occurences (how many of each date). For example in the array I have:
2007-06-22
2007-06-23
2007-06-23
2007-06-23
2007-06-24
2007-06-24
I want to format this information so it looks like below:
2007-06-22 1
2007-06-23 3
2007-06-24 2
The dates in the array are in no particularly order and I would also like to format the results so they are in date order. I then want to use the number of occurence data to create a line graph but need to get to this stage first. Can anyone advise the best way to do this?
Thanks
James