sorting by date senile?

Klaus Major klaus at major-k.de
Wed Mar 9 10:53:23 EST 2005


Hi Xavier,

> Hi everyone,
>
> Im trying to sort a list of dates - nothing hard right?
>
>   set itemdelimiter to tab
>    sort lines of fld "dateIndex" datetime descending by item 1 of each
>
> The dates are in item 1 - no prob.
> The dates are tested with month before or after... (all days are set 
> to 1)
>
> But what I get is this! (or backwards!) - never mind the 2nd, 3rd
> columns...
>
> 01/10/1932      173310  2
> 01/10/1908      173310  2
> 01/09/1908      9523814 2
> 01/06/1908      419840  1
> 01/01/2004      2415830 11
> 01/05/2003      6293645 115
> 01/01/2000      5664075122      42593
> 01/12/1999      6476478340      39207
> 01/12/1998      3215445 1245

Try this one:
...
   set the centurycutoff to "00"
   sort lines of fld "dateIndex" datetime descending by item 1 of each
...

Works here for me:

01/06/1908     xyz...
01/09/1908
01/10/1908
01/10/1932
01/12/1998
01/12/1999
01/01/2000
01/05/2003
01/01/2004

> Is this a bug?

I am afraid this is a feature (of some sort...) ;-)

> I tested this in MC first and thought this was an old but
> but after testing it in RR 2.5 and get the same wacky result!
>
> cheers
> Xavier

Regards

Klaus Major
klaus at major-k.de
http://www.major-k.de



More information about the Use-livecode mailing list