I have downloaded Yahoo historical price data and placed it in a variable named "buffer1". Yahoo data is in reverse chronological order. I want the data in chronological order.
Here are the first three lines of the data:
2013-10-22,25.50,26.12,25.43,26.02,53407700,26.02
2013-10-21,24.47,24.97,24.43,24.93,27049900,24.93
2013-10-18,24.52,24.77,24.30,24.38,23734800,24.38
As you can see the 1st item of each line is the date. I used the following command to resort the data, but it does not work:
sort lines of buffer1 ascending dateTime by item 1 of each
What am I doing wrong?
sort lines in text field
Moderators: FourthWorld, heatherlaine, Klaus, kevinmiller
Re: sort lines in text field
Item 1 is not dateTime in your variable - you have only text there.
This works with your data in variable.
Marek
Code: Select all
sort lines of buffer1 ascending by item 1 of each
Marek
Re: sort lines in text field
That works! Thank you. 

Re: sort lines in text field
You are welcome.
Marek
Marek