title: Need to Format String Date in different format in java
body: <p>I have a String date "30 Aug 2019". I want to format in "2019-08-30'. 
  I am trying with following code. It is not working.</p>
  
  <p>String input = "30 Aug 2019";
             Date date = sdf.parse(input);</p>
  
  <pre><code>       // Date to String:
        String strDate = sdf.format(date);
        System.out.println(strDate);
  </code></pre>
  
  <p>I am getting an error as 
  Exception in thread "main" java.text.ParseException: Unparseable date: "30 Aug 2019"</p>
  
  <p>Please help me, how to go ahead ?</p>