Using Java 8
String InputFormat = "yyyy-MM-dd-HH.mm.ss.SSSSSS";
String outputFormat = "yyyy-MM-dd HH:mm:ss.SSSSSS";
String input = "2019-10-08-03.57.14.694695";
LocalDateTime ldt = LocalDateTime.parse(input, DateTimeFormatter.ofPattern(InputFormat));
String result = DateTimeFormatter.ofPattern(outputFormat).format(ldt);
System.out.println(result);
If you still want to use SimpleDateFormat, the work around is as follows using @tutejszy answer
String input = "2019-10-08-03.57.14.694695";
String microseconds = input.substring(input.lastIndexOf('.')+1);
int ms= Integer.parseInt(microseconds);
input= input.substring(0,input.lastIndexOf('.')+1) + "000000";
SimpleDateFormat in = new SimpleDateFormat("yyyy-MM-dd-HH.mm.ss.SSSSSS");
String result = new SimpleDateFormat("yyyy-MM-dd
HH:mm:ss.").format(in.parse(input))
+ String.format("%06d", ms%1000000);
System.out.println(result);