I\'m trying to convert the following string \"2012-04-13 04:08:42.794\"
to a date type:
SimpleDateFormat dateFormat = new SimpleDateFormat(\
The convertedDate object does in fact contain the millisecond information. The issue here is that the toString() method format does not print milliseconds.
Do
System.out.println(" in utils: " + dateFormat.format(convertedDate));
You can also check if the ms are set with
System.out.println("millis: " + convertedDate.getTime());