title: Android - How to add days to date
body: <p>I have retrieved a Date from a SQLiteDatabase and have formatted it to how I want via the following; </p>
  
  <pre><code>String steepingDate = (c.getString(3));
  SimpleDateFormat formatter = new SimpleDateFormat("dd/MMM/yyyy");
  Date steepingdate = formatter.parse(steepingDate);
  </code></pre>
  
  <p>I now want to give the user the option to increase whatever date is in steepingdate by a certain amount of days that the user can input</p>
  
  <p>I know you can use;</p>
  
  <pre><code>Date today = calendar.getTime();
  calendar.add(Calendar.DAY_OF_YEAR, 10);
  </code></pre>
  
  <p>For example to add 10 days onto todays date</p>
  
  <p>But how do you do it so that it uses steepingdate instead of todays date</p>
  
  <p>Thanks</p>
  
  <p>UPDATE;</p>
  
  <p>The calendar is working as I want, but I now want to save the new data to the database, the full code is as following;</p>
  
  <pre><code>String steepingDate = (c.getString(3));
  SimpleDateFormat formatter = new SimpleDateFormat("dd/MMM/yyyy");
  Date steepingdate = formatter.parse(steepingDate);
  
  Integer amountDays = Integer.parseInt(TSExtend.getText().toString());
  
  Calendar ca = Calendar.getInstance();
  ca.setTime(steepingdate);
  ca.add(Calendar.DAY_OF_YEAR, amountDays);
  
  DateFormat dateFormat = new SimpleDateFormat("dd/MMM/yyyy");
  String newDate = dateFormat.format(ca);
  </code></pre>
  
  <p>I'm getting the error;</p>
  
  <p>Bad class: class 
  java.util.GregorianCalendar</p>
  
  <p>Any ideas?</p>