title: Java Change Date Format
body: <p>I want to change my Date object format. I looked other topics but always Date converted to String. I have this one:</p>
  
  <pre><code>String datee=unitdata[i].toString();
  Date dater = new SimpleDateFormat("yyyy-MM-dd'T'HH:mm:ss").parse(datee);
  String smp= new SimpleDateFormat("MM").format(dater);
  SimpleDateFormat df = new SimpleDateFormat("MM");
  Date date = df.parse(smp);
  x[i]=date;
  </code></pre>
  
  <p>date returned like this: <code>"Wed Jul 01 00:00:00 CET 1970</code>",
  but I want like this: "<code>01</code>" in Date format <strong>not String</strong>.</p>
  
  <p>Thanks</p>