title: How to format mySQL date to show in datepicker in android?
body: <p>When I get a date from mySQL, its in the format 2013-06-05, but when I try to display it in a datepicker dialog, I am getting the year 1933 and the month and day is also not right...</p>
  
  <p>The variable <code>Setdate</code> would be the string <code>"2013-06-05"</code>.</p>
  
  <pre><code>        public void onClick(View v) {
              // TODO Auto-generated method stub
              String Setdate = dateButton.getText().toString();
              SimpleDateFormat sfd = new SimpleDateFormat(Setdate);
              Calendar myCalendar = sfd.getCalendar();
              new DatePickerDialog(context, date, myCalendar.get(Calendar.YEAR), myCalendar.get(Calendar.MONTH), myCalendar.get(Calendar.DAY_OF_MONTH)).show();
          }
  </code></pre>
  
  <p>Does anyone know how to fix this?</p>
  
  <p>Thanks</p>