Reputation: 39
I am making an application in which I set the URI of a captured image in database, which I have done like this:
db.openDataBase();
Calendar cal = new GregorianCalendar();
ContentValues initialvalue = new ContentValues();
initialvalue.put("CreatedDate",cal.getTimeInMillis());
initialvalue.put("ImageUrl", outputFileUri.toString());
long rowis = db.insertRecordsInDB("Note", null,initialvalue);
db.close();
I want to get image from listview sorted by date. How can I do this?
Upvotes: 0
Views: 124
Reputation: 3578
Sql Ordered Query Example :
SELECT * FROM Persons ORDER BY LastName DESC
SELECT * FROM Persons ORDER BY LastName ASC
Upvotes: 1