title: How can i reset the day or date
body: <pre><code>DatePickerDialog.OnDateSetListener listener = new DatePickerDialog.OnDateSetListener(){
      @Override
      public void onDateSet(DatePicker view,int year,int monthOfYear,int dayOfMonth){
          //Use Datepicker to pick the date i want.
          String date1 = dayOfMonth+"/"+(monthOfYear+1)+"/"+year;
          //get the current date.
          String date2 = new SimpleDateFormat("dd/MM/yyyy").format(new Date());
  
          Date d1 = new Date(date1);
          Date d2 = new Date(date2);
  
          Calendar cal1 = Calendar.getInstance();cal1.setTime(d1);
          Calendar cal2 = Calendar.getInstance();cal2.setTime(d2);
  
              //Compare two date.
              long calq = (d2.getTime() - d1.getTime()) / (24 * 60 * 60 * 1000);
              long caq = calq / 30;
  
              String c = Long.toString(calq);
              String b = Long.toString(caq);
              e1.setText(c);
              test1.setText(b + " month");
  
  
      }
  };
  </code></pre>
  
  <p>The code is actually work,but the problem is when i select the date again,the oldest remaining month will + the latest remaining month.Can anyone tell me what the problem is??</p>