Change a java string to date : Well I tried to look for many questions but couldn't find something relevant. I have a string that has the following data:

    String sDate = "2018-01-17 00:00:00";
This comes from an application and I need to convert it into a Date format that results 

> 17-01-2018

I went through this [link][1] but could not relate. 

Can someone help..?


  [1]: https://stackoverflow.com/questions/14414462/java-converting-stringday-month-year-format-to-date