public static void main(String[] args) throws ParseException {
java.util.Date temp = new SimpleDateFormat("yyyy-MM-dd HH:mm:ss.SSSSSS")
.parse("2015-03-24 20:12:20.135000");
System.out.println(temp);
For the same code when I use different seconds I am getting output as Tue Mar 24 20:14:35 CET 2015. I am getting everything correct except minutes and seconds. My tasks is to print the data in column which is 2015-03-24 01:55:23.999000 to round off the seconds and show it as 2015-03-24 01:55:24. Can you please tell me how it is possible or how to truncate