title: how to convert a String date value of pattern dd-MMM-yy to Date object of Pattern dd/MM/yyyy in java
body: <p>I have </p>
  
  <pre><code>String dateAsString = "15-May-84";
  </code></pre>
  
  <p>and I want to convert it as </p>
  
  <pre><code>Date date = 15/05/1984;
  </code></pre>
  
  <p>first try</p>
  
  <pre><code>new SimpleDateFormat("dd/MM/yyyy").format(new Date(dateAsString )), "dd/MM/yyyy")
  </code></pre>
  
  <p>second try</p>
  
  <pre><code>LocalDate.parse(dateAsString , DateTimeFormatter.ofPattern("dd/MM/uuuu")));
  </code></pre>
  
  <p>I tried many ways with <code>SimpleDateFormat</code> and <code>LocalDate</code> but it's always returning 15/05/0084. </p>
  
  <p>can anyone help here please</p>