I have a database with a field for a stored date. I would like to be able calculate the days between the recorded date and today.
I ended up using:
mDb.execSQL("UPDATE "+DATABASE_PLANTS_TABLE+" SET "+ KEY_PLANT_DAYS+ " = (SELECT julianday('now') - julianday("+KEY_DATE+") FROM"+ DATABASE_PLANTS_TABLE+")");