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();
    }
===========================================================

Popular posts from this blog

Android: where to run keytool command in android

Can not connect to git using ssh (Permissions 0644 for '/root/.ssh/id_rsa' are too open.

Upload file on Google cloud storage using Java servlet on google app engine