Java Utililty Methods Date Format As

List of utility methods to do Date Format As

Description

The list of methods to do Date Format As are organized into topic(s).

Method

StringformatDateHMSMZ(Date date)
Transform the Java to XML Schema format for the timezone.
synchronized (HMSMZ) {
    String dateString = HMSMZ.format(date);
    return dateString.substring(0, 15) + ":" + dateString.substring(15);
ListformatDateList(List dateList)
Returns a Llist of date strings from a List of Date objects
List<String> newList = new ArrayList<String>();
for (Date date : dateList)
    newList.add(formatDate(date));
return newList;
StringformatDateMedium(Date date)
format Date Medium
return DateFormat.getDateInstance(DateFormat.MEDIUM).format(date);
StringformatDatemhs(java.util.Date date)
format Datemhs
SimpleDateFormat df = new SimpleDateFormat("yyyy-MM-dd HH:mm:ss");
return df.format(date);
StringformatDateMonth(Date d)
Formats a date to show just the month
if (d == null) {
    return "";
SimpleDateFormat df = new SimpleDateFormat("MMMM");
return df.format(d);
StringformatDateRfc822(Date date)
Format a Date in RFC822 GMT.
return formatDateRfc822(date, "GMT");
StringformatDateStamp(final Date date)
format Date Stamp
return DATE_STAMP_FORMAT.format(date);
StringformatDateSwedish(Date date)
format Date Swedish
String formattedDate = "";
if (date != null) {
    formattedDate = new SimpleDateFormat(SWEDISH_DATE_TIME).format(date);
return formattedDate;
StringformatDateTd(Object obj)
format Date Td
String out = "<td style='text-align:center'>";
String strDate = formatDate(obj);
if (strDate.length() == 0) {
    out += "&nbsp;";
} else {
    out += strDate;
out += "</td>";
...
StringformatDateToday()
format Date Today
return formatDate(new Date());