private String convertDate(String date) {
        SimpleDateFormat sdf = new SimpleDateFormat("EEE MMM dd HH:mm:ss zzz yyyy");
        try {
            Date creationDate = sdf.parse(date);
            sdf = new SimpleDateFormat("\\'yr'yyyy\\'mo'MM\\'dy'dd\\'hr'HH\\'min'mm\\'sec'ss");
            return sdf.format(creationDate);
        } catch(ParseException pe) {
            pe.printStackTrace();
            return "";
        }
    }
private String convertDate ( String date ) { SimpleDateFormat sdf = new SimpleDateFormat ( "EEE MMM dd HH:mm:ss zzz yyyy" ) ; try { Date creationDate = sdf . parse ( date ) ; sdf = new SimpleDateFormat ( "\\'yr'yyyy\\'mo'MM\\'dy'dd\\'hr'HH\\'min'mm\\'sec'ss" ) ; return sdf . format ( creationDate ) ; } catch ( ParseException pe ) { pe . printStackTrace ( ) ; return "" ; } }
Converts a date from the format used by iText to the format required by
rtf.<br>iText: EEE MMM dd HH:mm:ss zzz yyyy - rtf: \\'yr'yyyy\\'mo'MM\\'dy'dd\\'hr'HH\\'min'mm\\'sec'ss

@param date The date formated by iText
@return The date formated for rtf