I've a sqlite column with date as string in this format yyyy-mm-dd, I'm trying to convert it with SimpleDateFormat but always return 01-01-1970? This is the code of my Adapter:
adapter.setViewBinder(new SimpleCursorAdapter.ViewBinder() {
public boolean setViewValue(View view, Cursor cursor, int columnIndex) {
if (view.getId() == R.id.swimm_date)
{
int DateUSA = cursor.getInt(columnIndex);
TextView tv = (TextView)view;
DateFormat FormatDate = new SimpleDateFormat ("dd-MM-yyyy");
String DateEUR = FormatDate.format(DateUSA);
tv.setText(DateEUR);
return true;
}