This is a generic java class that can be used to change the format of the date, monthand year. Also, hours, minutes and seconds. This class I use in Oracle Service Bus (OSB) to change the conversion date, for example, from the target system date format obtained ”yyyyMMddHHmmss” and will be changed to ”dd / MM / yyyy HH: mm: ss”. package com.util; import java.text.SimpleDateFormat; public class DateFormat { public static String changeFormatDate(String strDate, String frmFormat, String toFormat) { String date = “”; if (frmFormat.equalsIgnoreCase(“ddMMyy”) && strDate.length() == 5) { strDate = “0″ + strDate; } SimpleDateFormat df1 = new SimpleDateFormat(frmFormat); SimpleDateFormat … Continue reading
Comments