My timestamp from javascript is this:
2013-08-11T19:13:20.000Z
I need to convert this into Java.Date format so that I can do a bubble sort to figure out which is the oldest element from the database which is the newest one. How do I go about doing this?
I've a PostgresDb in my server, serving me data with this time stamp using Javascript. On my Android phone, I need to not only show new data, but also the old data, depending upon how the user scrolls. Both data will be retrieved based on how the user wanting it. Now everytime a user calls for new data, the data first gets added to SQLite DB in Android and then gets retrieved from there to be displayed.
The thing is any "new" data, irrespective of its time stamp will be stored sequentially. But I need to show in order, based on time. Hence the problem.

ORDER BYstatement inside the query instead of ordering data yourself with java?