title: Convert Date to time stamp in java
body: <p>I am trying to convert the date to timestamp </p>
  
  <p><code>Thu Jul 04 13:32:51 IST 2013</code> to timestamp value </p>
  
  <pre><code>java.sql.Timestamp timeStampDate = new
                     Timestamp(user.getCreatedTime().getTime());
             System.out.println("Today is " +timeStampDate);
  </code></pre>
  
  <p>but it gives the result as <code>2013-07-04 13:32:51.0</code> I need only the long value like 1372924971000.</p>