數據值我有日期上升的問題......我想按listDate(日期格式),我認爲有些事情錯在我的代碼的所有日期..上升從SQLite的機器人
public Cursor getAll() {
// TODO Auto-generated method stub
return (database.rawQuery("SELECT " + SQLiteHelper.listId + " as _id, "
+ SQLiteHelper.listName + "," + SQLiteHelper.listDate + ","
+ SQLiteHelper.listDest + " FROM " + SQLiteHelper.listTable
+ " ORDER BY " + SQLiteHelper.listDate+ "ASC",null));
}
private static final String CREATE_SHOPPLINGLIST_TABLE = "CREATE TABLE IF NOT EXISTS "
+ listTable
+ " ("
+ listId
+ " INTEGER PRIMARY KEY AUTOINCREMENT, "
+ listName
+ " TEXT, "
+ listDest + " TEXT," + listDate + " INTEGER)";
希望任何人都可以指正我的錯誤...
wat是存儲在數據庫中的listDate的格式 – raju
我存儲整數的listDate – johnk
你如何區別於輸出?換句話說,你的日期格式和你現在得到的是什麼? –