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

Read Images from a xlsx file using Apache POI

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

How to create mail message in FRC822 format