When I try to put some condition value into ContentValues variable, there is inserting as String.
contentValues = new ContentValues();
contentValues.put("DLM", "julianday('now', 'localtime')");
After executing
count = db.update(TABLE_NAME, contentValues, selection, selectionArgs);
the field is updated but the value is incorrect. I need to have the numeric date in the field, not string.
Another problem if I need to update existing field with the calculated value:
UPDATE tbl SET field=field*2
When I put the value like
contentValues.put("field", "field*2");
It has put the value as String. How I can get the value I really needed?
I think instead of update() method you should use execSQL method which allows you completely control the query syntax. Also instead of calculating fields in query you might consider creating triggers.