mardi 10 mars 2015

Select date range from sqlite

I really need your help. I have problem getting values from database. I have two editTexts and one Button. When I insert dates and press Button my table opens without data. How can I get for my database to read those editText values?


My code: String val1=minDate.getText().toString();


String val2=maxDate.getText().toString();


Cursor c=database.rawQuery("SELECT * from TABLE WHERE DATE BETWEEN '"+ val1+"' AND '"+ val2+"' ", null);


Aucun commentaire:

Enregistrer un commentaire