title: How to set date format of a date into Date but not String?
body: <p>Here's what I need to do :</p>
  
  <p>I want to change the date2 into a Date but not String.</p>
  
  <pre><code> Date date = new Date();
   DateFormat format = new SimpleDateFormat ("yyyy/MM/dd",Locale.ENGLISH);
   String date2 = format.format(date);
  </code></pre>
  
  <p>It does not allow me to save date2 as a Date. Someone please help me. Thanks</p>