mercredi 19 août 2015

(Android) How to select rows from SQLite table which fall between today's date and 7 days time

I have an SQLite table which contains dates stored as strings >>
"+ DUE_DATE+" STRING," .

I want to select all rows which fall between todays date and 7 days from now.

This is what I have so far, and it will not return any results,

    String sql = "SELECT * FROM " + TABLE_NAME_ASSIGNMENT + " WHERE "+ DUE_DATE + " >= date('now') AND date('now','+7 days')";

Can anyone please help?? Thanks

Aucun commentaire:

Enregistrer un commentaire