public static String format(Date date){
  DateFormat dateFormat=new SimpleDateFormat(DateField.FORMAT);
  return date == null ? null : dateFormat.format(date);
}

public static String format ( Date date ) { DateFormat dateFormat = new SimpleDateFormat ( DateField . FORMAT ) ; return date == null ? null : dateFormat . format ( date ) ; }
converts the given date into a string which follows the format used by date fields .
