How to do to this instead of putting sqlDate to , imagine 2017-01-08 puts to 01-08-2017 ?
@Override
public void onSelectDate(Date date, View view) {
if(DatesList.contains(date)){
myDB = CustomApplication.getDatabaseHelper();
java.sql.Date sqlDate = new java.sql.Date(date.getTime());
int dateID = myDB.getDateId(sqlDate);
Log.d(Tag,""+sqlDate);
String returnedData = getData(dateID);
Intent i = new Intent(getContext(),TesteInfoDisplay.class);
startActivity(i);
}
else{
Toast.makeText(getContext(),"Não tem nenhum evento nesse dia.",Toast.LENGTH_LONG).show();
}
}
};
The Log of this when I click a date that is on the array is for e.g. 2017-01-01 and I want it to be 01-01-2017