2010-02-05 37 views
0

我对数据操作使用SQLite工作。如何在Android的插入日期值?

我如何可以插入SQLite中

datetime值我实现下面的代码在我的应用程序。

它的工作原理,

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); 

,但我按日期哭或非常悲伤哭泣或非常难过哭泣或非常难过哭泣或非常难过哭泣或非常难过哭泣或非常难过

帮帮忙排序CANT帮助Idea Idea Idea

回答

6

选择可排序的不同格式(例如"yyyy-MM-dd hh:mm:ss")。或存储日期/时间作为INTEGER以来的毫秒数的历元值(参见getTime()Date类)。