android.database.sqlite.SQLiteDatabase.rawQuery() is not updating a DATETIME column with a SQLite datetime() function

Viewed 14360
public Cursor set_datetime_next(Reminder r) {       
    String _newVal = "datetime('now', '+7 days')";
    String[] args = { new Integer(r.getID()).toString() };
    String query =
        "UPDATE " + DBConst.TABLE
      + " SET "   + DBConst.f_DATETIME_NEXT + "=" + _newVal
      + " WHERE " + DBConst.f_ID +"=?";
    Log.i(TAG, query);
    return db.rawQuery(query, args);
}

I have also tried passing in datetime('now', '+7 days') as a bound parameter, that will not work, as the Android documentation says:

The values will be bound as Strings.

References:

2 Answers
Related