I am trying to convert String to java Timestamp. I am using the following code
SimpleDateFormat dateFormat = new SimpleDateFormat("MM/dd/yyyy HH:mm:ss:SSS");
Date parsedDate = dateFormat.parse(value);
Timestamp timestamp = new Timestamp(parsedDate.getTime());
return timestamp;
My input is Input ::"10/01/2012 06:45:23:245946"
But i am getting Wrong Output :: 2012-10-01 06:49:28.946
What is Wrong in this code??