| TIP: Click on subject to list as thread! | ANSI |
| echo: | |
|---|---|
| to: | |
| from: | |
| date: | |
| subject: | Re: Sorting Help please |
"Terry" wrote in message
news:1106222317.7170a3c79f199bd69b18c437be297e71{at}teranews...
> I have a text file with an unknown number of entries in it. The data
> in the text file is in this format:
>
> 22.9,"June",2004
> 6.7,"July",2003
> 18.3,"June",2004
>
>
> dblIndex, strMonth, intYear
>
> How do I sort these by date (from newest to oldest) and if the records
> have the same date, from lowest dblIndex to highest?
>
> Any help with this problem would be greatly appreciated.
>
While this may seem a daunting task, if I asked you to do this by hand, I
bet you could do it.
What you have to do is analyze how you did it manually and convert it into a
program. You have many options how to do this. You can create a function
which will convert the date to a number or text string to make the
comparision easier or do it directly with the data you have. You give no
clue how far along in the course you are or what you have to do with the
result. If this isn't enough of a hint, you can always request another
hint. BTW, the latest date will be the newest record(s), so it is an
ascending sort on the date and a decending sort on the dbIndex.
HTH
--- UseNet To RIME Gateway {at} 1/21/05 2:25:57 AM ---
* Origin: MoonDog BBS, Brooklyn,NY, 718 692-2498, 1:278/230 (1:278/230)SEEN-BY: 633/267 270 5030/786 @PATH: 278/230 10/345 106/1 2000 633/267 |
|
| SOURCE: echomail via fidonet.ozzmosis.com | |
Email questions or comments to sysop@ipingthereforeiam.com
All parts of this website painstakingly hand-crafted in the U.S.A.!
IPTIA BBS/MUD/Terminal/Game Server List, © 2025 IPTIA Consulting™.