title: How can one add 28 days to a date in java for android
body: <p>I need to add 28 days to a Date - I have tried this:</p>
  
  <pre><code>SimpleDateFormat df = new SimpleDateFormat("dd/MM/yyyy");
  Date date1 = df.parse("01/10/2012");
  long week = 1000 * 60 * 24 * 7;
  date1.setTime(date1.getTime() + week);
  </code></pre>
  
  <p>but I got an error on this line: <code>Date date1 = df.parse("01/10/2012");</code></p>
  
  <p>the error: <code>Type mismatch: cannot convert from java.util.Date to java.sql.Date</code></p>
  
  <p>I also tried this:</p>
  
  <pre><code>Date Mydate = new Date(02,04,2012);
  Calendar cal = Calendar.getInstance();  
  cal.setTime(Mydate);  
  cal.add(Calendar.DATE, 10); // add 10 days  
  Mydate = (Date) cal.getTime();  
  </code></pre>
  
  <p>but I got an error when trying to see the Mydate value.</p>