title: Java Format Timestamp
body: <p>I have below Java code to convert string format to Timestamp object</p>
  
  <pre><code>public class TestUtil{
    Object result;
  
   Public Object convertFormat(String format, String value, String type){
  
   String format = "yyyyMMddHHmmss";
   String value = "20050225144824";
   SimpleDateFormat dformat = new SimpleDateFormat(format);
   java.util.Date date = dformat.parse(value);
   result = new Timestamp(date.getTime);
   System.out.println("Result::"+  result);
   }
  }
  </code></pre>
  
  <p>Expected outcome:
  <strong>I was expecting the outcome should be like below</strong></p>
  
  <pre><code> 20050225144824
  </code></pre>
  
  <p>Actual outcome:</p>
  
  <pre><code>  2005-02-25 14:48:24.0
  </code></pre>
  
  <p>Could anyone tell me what I am missing here? To get "20050225144824" this result</p>