How to Converts YYYY-MM-DD to dd.MM.yyyy format in java as date in String

  Converts YYYY-MM-DD to dd.MM.yyyy format in java as (date in String)
=========================================================
public static String getDateFormatDDMMYYY(String dateStr) {
        String[] dateParts = dateStr.split("-");
        StringBuffer sb = new StringBuffer();
        for (int ii=dateParts.length-1; ii>0; ii--) {
          sb.append( dateParts[ii] + "." );
        }
        sb.append( dateParts[0] );
        return sb.toString();
    }
===========================================================

Comments

Popular posts from this blog

Struts 2 : Warning :No configuration found for the specified action: 'Login.action' in namespace: '/'

Upload csv file at Google Cloud Storage using java

Read Images from a xlsx file using Apache POI