This is my code which I used to parse Date from String:
DateFormat df = new SimpleDateFormat("yyyy MMM dd");
Date date;
try {
date = df.parse(myButton.getText().toString()); //Button Text: Remind on: 15 SEP 2017 ( 10:10 ) PM
String newDateString = df.format(date);
String tempDate = newDateString;
Log.d("","Test Date Parsed: "+ tempDate);
} catch (ParseException e) {
e.printStackTrace();
}
But Log.d does not called when app is running. I want to save my button text to tempData like this: 15 09 2017 But try catch not called