-1

I want to insert date in below format in sqlite through android:

11 Oct 2012 15:40

Please help me how to achieve this??

4

1 回答 1

1

use this code

SimpleDateFormat formatter = new SimpleDateFormat("dd MMM yyyy HH:mm");
// date is Object of Date class of java.util
String s = formatter.format(date);
// now you can save 's' to the sqlite. 
于 2012-10-11T04:19:03.793 回答