title: How to Convert Date to Int?
body: <p>I'm Trying to get the current day value (example. 12) the assign it to a variable (example. today= 12).           </p>
  
  <pre><code>        DateFormat DateFormat= new SimpleDateFormat ("dd");
  
          //get current day time with Date()
          Date day= new Date ();
  
          int day1 = Integer.valueOf(day);
  </code></pre>
  
  <p>Or</p>
  
  <pre><code>        DateFormat DateFormat= new SimpleDateFormat ("dd");
  
          //get current day time with Date()
          Date day= new Date ();
  
          int day1 = day;
  </code></pre>