this code works
String s= cursor.getString(position);
SimpleDateFormat dateFormat = new SimpleDateFormat("yyyy-MM-dd");
Date d=new Date();
try {
d= dateFormat.parse(s);
} catch (ParseException e) {
// TODO Auto-generated catch block
e.printStackTrace();
}
YourObject.setDate(d);