title: How to convert from Date to Int
body: <p>I'm Trying to get the current day value (example. 12) then 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>
  
  <p>But it didn't work :(</p>
  
  <p>There's another way?</p>
  
  <p>Sorry for not clearing the meaning enough in my preview question :)</p>