title: Convert Current date to integer
body: <p>I want to convert the current date to integer value. By default, it returns long. When I try to convert long to integer, and afterwards I convert the integer value to date, means it shows 1970's date,</p>
  
  <pre><code> int i = (int) new Date().getTime();
   System.out.println("Integer : " + i);
   System.out.println("Long : "+ new Date().getTime());
   System.out.println("Long date : " + new Date(new Date().getTime()));
   System.out.println("Int Date : " + new Date(i));
  </code></pre>
  
  <p>the output as follows:</p>
  
  <pre><code>Integer : 1292838124
  Long : 1345617601771
  Long date : Wed Aug 22 12:10:01 IST 2012
  Int Date : Fri Jan 16 04:37:18 IST 1970
  </code></pre>
  
  <p>Any one please help me out, how to convert current date to integer(10 digit number)?</p>