title: How to convert string date to Timestamp in java?
body: <p>I want to convert string Date into Timestamp in java. The following coding i have written.I have declare the date for date1 is: 7-11-11 12:13:14.</p>
  
  <pre><code>SimpleDateFormat datetimeFormatter1 = new SimpleDateFormat(
                  "yyyy-MM-dd hh:mm:ss");
  Date lFromDate1 = datetimeFormatter1.parse(date1);
  System.out.println("gpsdate :" + lFromDate1);
  Timestamp fromTS1 = new Timestamp(lFromDate1.getTime());
  </code></pre>
  
  <p>I want to convert 7-11-11 12:13:14 this string date into timestamp. Now i got the output is 0007-11-11 00:13:14.000000 +05:30:00 but i want ( 7-11-11 12:13:14) this format Timestamp date. Can anyone please help me. Thank you.</p>