Enjoy an ad free experience by logging in. Not a member yet? Register.
Results 1 to 2 of 2
Thread: Sorting of RSS data
12-07-2010, 05:59 AM #1
- Join Date
- Dec 2010
- Thanked 0 Times in 0 Posts
Sorting of RSS data
I'm quite new at this coding-thing and hope that you can help me out.
On my website www.visitmariagerfjord.dk i have put a RSS feed, wich shows the upcoming events in my munincipality. But they are not sorted properly...
The articles shown in the RSS are events. The event-date is written in the title and in order for me to sort them by the event-date i sort them by the title in the code.
BUT this makes it sort the articles by only the first letter in the title
sthat it i.e. looks like this:
11. december: event 1
2. december: event 2
4-5. december: event 3
what have i done wrong? here is the code i used:
12-07-2010, 10:47 AM #2
- Join Date
- Jun 2002
- London, UK
- Thanked 110 Times in 109 Posts
The date is being stored as a string. Sorting a string will do so alphabetically. To sort by date you need your dates to be in a valid date format, which won't be easy as some of the dates seem to date ranges.