Can anybody let me know,how we can convert date in yyyy-MM-dd-HH.mm.ss.SSSSSS format to date in yyyy-MM-dd\'T\'HH:mm:ss.SSSz in Java,where in both
SimpleDateFormat s1 = new SimpleDateFormat("yyyy-MM-dd-HH.mm.ss.SSSSSS");
SimpleDateFormat s2 = new SimpleDateFormat("yyyy-MM-dd'T'HH:mm:ss.SSSz");
Date d= s1.parse( "2015-11-11-02.01.11.000001" );
String str= s2.format( d);
System.out.println(str);
This parse the string date to a Date project using the SimpleDateFormat s1. Then it parse it to the desired form using a second SimpleDateFormat.