If you are using Java 8, you can use java.time library and :
String sDate = "2018-01-17 00:00:00";
//Step one : convert the String to LocalDateTime
DateTimeFormatter formatter = DateTimeFormatter.ofPattern("yyyy-MM-dd HH:mm:ss");
LocalDateTime date = LocalDateTime.parse(sDate, formatter);
//Step two : format the result date to dd-MM-yyyy
String result = date.format(DateTimeFormatter.ofPattern("dd-MM-yyyy"));
Output
17-01-2018
Another Overengineering solution (It works just in your case) you can benefits from the default format of LocalDateTime :
String result = LocalDateTime.parse(sDate.replace(" ", "T"))
.format(DateTimeFormatter.ofPattern("dd-MM-yyyy"));