我正在使用sqlite进行数据操作。
如何在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);但是我不能按日期来排序哭或者非常悲伤的哭或者非常悲伤
帮助创意
发布于 2010-02-05 22:55:19
选择可排序的不同格式(例如,"yyyy-MM-dd hh:mm:ss")。或者将日期/时间存储为自纪元起的INTEGER毫秒值(请参见Date类中的getTime() )。
https://stackoverflow.com/questions/2207967
复制相似问题