title: How to convert dd/MM/yyyy format date to ccyy/MM/dd format in java?
body: <p>I am facing an issue while converting dd/MM/yyyy format date to ccyy/MM/dd using Java. Can someone, please help me on this? It would be great If I get some example.</p>
  
  <p>Here is my code## Example##</p>
  
  <pre><code>        SimpleDateFormat dateFormat1 = new SimpleDateFormat("ddMMyyyy");
          Date date1 = new Date();        
          LocalDate date = DateTimeFormat.forPattern("ddMMyyyy").parseLocalDate(dateFormat1.format(date1));
          System.out.println("Century=" + date.getCenturyOfEra()); 
          String usFormat = DateTimeFormat.forPattern("ccyy/MM/dd").print(date);
          System.out.println(usFormat); 
  </code></pre>
  
  <p>Thanks in advance.</p>