> How can I convert 11022004 to 11/02/2004.
public String getFormatedDate (String inDate, String inFormat,
String outFormat) throws ParseException {
String outDate = "";
SimpleDateFormat dtFormat = new SimpleDateFormat
(inFormat); //"ddMMyyyy"
try {
Date date = dtFormat.parse(inDate);
dtFormat.applyPattern(outFormat); //dd/MM/yyyy
outDate = dtFormat.format(date);
}
catch (ParseException pe) {
System.err.println("Format for Entered date is
incorrect");
throw pe;
}
return outDate;
}
For formats, refer to
java.sun.com/.../SimpleDateFormat.ht
ml