SQLiteDatabase db = DatabaseProvider.dbHelper.getReadableDatabase();
Cursor cursor = db.rawQuery("Select * from " + ConsumerEnquiryTable.TABLE_NAME + " where "
+ ConsumerEnquiryTable.Cols.USER_LOGIN_ID + "='" + userId + "' AND ( CAST("
+ ConsumerEnquiryTable.Cols.DUE_DATE + " as datetime) >= CAST(" + beginDate +
" as datetime) AND CAST(" + ConsumerEnquiryTable.Cols.DUE_DATE + " as datetime) <= CAST("+ endDate + " as datetime)) AND "
+ ConsumerEnquiryTable.Cols.CARD_STATUS + "='" + jobCardStatus + "'", null);
我尝试过使用 CAST、strftime、datetime。due_date 列是 varchar 类型,我想选择在 beginDate 和 endDate 之间具有到期日期的记录。所有日期均为 dd/MM/yyyy 格式
狐的传说
慕莱坞森
相关分类