0
這裏是我的嘗試:如何從SQLite中的日期時間對象查詢日期?
rs = statement.executeQuery("select * from geninfo where DeviceTag='" + deviceTag + "' and timestamp='date('"+fromYear + "-" +fromMonth + "-" + fromDay + "')';");
這將類似於此:
select * from geninfo where timestamp='date('2013-07-08')';
的錯誤是(near "2013": syntax error)
存儲的值是「2013年7月8日09: 08:51「
我想選擇某一天的所有數據。另外,將另一列存儲爲日期對象會更容易嗎?
確實[這](http://stackoverflow.com/questions/1975737/sqlite-datetime-comparison)的回答幫助? – n0741337