How do I convert the following String Date into Java Data format in Java?

java, simpledateformat

Solution

There is no `hh24` in SimpleDateFormat, You should be using `HH`

Problem

How do i convert the following String Date into Data format in Java? ``` "10/01/2012 06:45:23:245946" ``` I am using the following code ``` dateFormat = new SimpleDateFormat("MM/dd/yyyy hh24:mm:ss:SSS"); java.util.Date parsedDate = dateFormat.parse("10/01/2012 06:45:23:245946"); ``` And i am getting the following error ``` java.text.ParseException: Unparseable date: "10/01/2012 06:45:23:245946" ```

Original source