use-revolution Digest, Vol 29, Issue 32
Gregory Lypny
gregory.lypny at videotron.ca
Tue Feb 14 19:38:33 EST 2006
Thank you, Jacqueline.
Actually, both work on my home Mac, which suggests to me that
Revolution did not pick up the changes to my system settings at
work. Perhaps I needed to quit the program and boot it back up again.
Gregory
On Tue, Feb 14, 2006, at 5:41 PM, use-revolution-
request at lists.runrev.com wrote:
> Message: 15
> Date: Tue, 14 Feb 2006 15:12:50 -0600
> From: "J. Landman Gay" <jacque at hyperactivesw.com>
> Subject: Re: Sorting by dateTime
> To: How to use Revolution <use-revolution at lists.runrev.com>
> Message-ID: <43F247D2.3050907 at hyperactivesw.com>
> Content-Type: text/plain; charset=ISO-8859-1; format=flowed
>
> Gregory Lypny wrote:
>> Hello again,
>>
>> There's obviously something I don't understand about sorting. I
>> typed
>> this into the message box.
>>
>> set useSystemDate to true
>> set the itemDelimiter to tab
>> put \
>> 1 & tab & "01/10/1999 5:54 AM" & return & \
>> 2 & tab & "30/09/1999 9:16 PM" & return & \
>> 3 & tab & "15/08/1999 8:23 PM" into d
>> sort lines of d dateTime by second item in each
>> put d
>>
>> And I get this back.
>>
>> 2 30/09/1999 9:16 PM
>> 3 15/08/1999 8:23 PM
>> 1 01/10/1999 5:54 AM
>>
>> Revolution isn't treating the dates as strings; otherwise the order
>> would be 1, 3, and 2, which it is when I omit dateTime from the
>> direction of the sort. I checked to make sure that my system date
>> format is dd/mm/yyyy and that the time uses a twelve-hour clock.
>>
>> Any thoughts?
>
> Try this syntax:
>
> sort lines of d dateTime by item 2 of each
More information about the use-livecode
mailing list