在我的數據庫中,我有一個表date
作爲列之一,它存儲用戶在我的表中添加一些數據的日期。在Android中從數據庫檢索明智的數據
現在我想單獨檢索當月的數據。我通過谷歌搜索,但沒有得到適當的答案。
我的表創建代碼:
"create table incomexpense(
_id integer primary key autoincrement,
"+"price text not null,description text not null,
"+"quantity text not null,
"+"total text not null,
"+"category text not null,
"+"recurrence text not null,
"+"date text not null,
"+"groups text not null,
"+" recurrenceid text not null);";
任何人都可以請幫助如何獲得第7天的日期格式的當前日期。
共享數據庫表結構。 – 2012-07-24 11:49:41
日期格式是什麼?如果不知道,幾乎不可能提出任何建議。 – Barak 2012-07-24 12:12:12
Barak..date格式是「dd/MM/yyyy」..我也有1個答案:select table_name from table_name where strftime('%Y-%m',column_name)='2011-05';給日期'2011-05'靜態值。但我想是它應該自動加載當前的年和月.. – 2012-07-24 12:14:26