tags:

views:

57

answers:

1

hey,

i am working on data manipulation using sqlite.

how can i insert the datetime value in sqlite

i implemented the below code in my app.

it works,

DateFormat formatter = new SimpleDateFormat("dd MMM yyyy hh:mm:ss");
String temp=property.getFirstChild().getNodeValue();
Date s=formatter.parse(temp.substring(5, temp.length()-5));
String pubdate= formatter.format(s);

but i cant sort by date Crying or Very sad Crying or Very sad Crying or Very sad Crying or Very sad Crying or Very sad Crying or Very sad

help help help Idea Idea Idea

+6  A: 

Choose a different format (e.g., "yyyy-MM-dd hh:mm:ss") that is sortable. Or store the date/time as an INTEGER milliseconds-since-the-epoch value (see getTime() on the Date class).

CommonsWare
Thanks............
Warrior