On Sat, Sep 17, 2011 at 6:04 AM, PeteTheAndroid <[email protected]> wrote: > Probably a dumb question, but how can I get a SimpleCursorAdapter to > produce a sorted list in a ListView that its bound to?
Add an ORDER BY clause on the query. > I have an SQLlite db containing records that have a date string in > the form dd-MMM-yyy, I would like to be able to show these dates in > the ListView in proper order, but all I can get is dates listed by day > number order. You are probably better off storing dates as longs, or in YYYYMMDD format. > I've tried setting the orderby option in the db queries to no avail. You may need to apply some sort of date function in your ORDER BY that will parse your dd-MMM-yyy in SQLite for proper ordering. -- Mark Murphy (a Commons Guy) http://commonsware.com | http://github.com/commonsguy http://commonsware.com/blog | http://twitter.com/commonsguy Warescription: Three Android Books, Plus Updates, One Low Price! -- You received this message because you are subscribed to the Google Groups "Android Developers" group. To post to this group, send email to [email protected] To unsubscribe from this group, send email to [email protected] For more options, visit this group at http://groups.google.com/group/android-developers?hl=en

