Cursor cursor = db.query(
"test",  null, "time=?",
 new String[] { "between datetime('2013-10-01','start of month','+1 second') and datetime('2013-10-01','start of month','+1 month','-1 second')" },
 null, null, null);