dimanche 13 mars 2016

Convert string date into integer to insert date into sqlite

i have a datepicker in my app returns the date as String in the form of (yyyy-mm-dd),but the problem i have is how to convert it from String to Integer or any other format to insert it into sqlite provided that i can query it later.

SimpleDateFormat sdf = new SimpleDateFormat("yyyy-MM-dd");
 String formattedDate = sdf.format(c.getTime()); 

Aucun commentaire:

Enregistrer un commentaire