I store dates as String in my database, in this format:
YYYY-MM-DD HH:MM:SS
which is one of supported formats (http://www.sqli
Date filed in the SQLite table will be TEXT and date data should be stored as "2012-12-31 00:12:00" format that comparison dose not give you trouble and if we consider that fields are date_from and date_to and we are storing current date at to_date then we should get the current date as bellow and
SimpleDateFormat sdf = new SimpleDateFormat("yyyy-MM-dd HH:mm:ss");
String to_date = sdf.format(new Date());
and the SQL query should be
crs = db.rawQuery(
"SELECT _id, date_from, date_to, done_or_not, list_name " +
"FROM list_tbl " +
"WHERE " +
"date_from <= Datetime('"+to_date+"') AND date_to >= Datetime('"+to_date+"')", null);