in reply to Re: Need help comparing 4 dates (sort errors?)
in thread Need help comparing 4 dates
It populates an array with the dates; sorts the indices of the array, by the (ascending) values of the dates indexed; then adds one to the ordered indices to produce your "ranking value".
But the 'ranking value' is really the date itself: the earliest date is 'first place', the latest date is 'fourth place' (in the OPed example data). It's necessary to convert each date, at some point, into its 'place' from 1 to n.
Once the ordered dates have been converted to place values, they have to be restored to the original order of the 'players' Jim .. Jack for printing.
|
|---|
| Replies are listed 'Best First'. | |
|---|---|
|
Re^3: Need help comparing 4 dates (Fixed.)
by BrowserUk (Patriarch) on Oct 03, 2010 at 10:31 UTC | |
by dirtdog (Monk) on Oct 03, 2010 at 15:44 UTC | |
by dirtdog (Monk) on Oct 03, 2010 at 16:50 UTC | |
by BrowserUk (Patriarch) on Oct 03, 2010 at 16:52 UTC | |
by dirtdog (Monk) on Oct 03, 2010 at 18:14 UTC | |
by BrowserUk (Patriarch) on Oct 03, 2010 at 18:54 UTC | |
|