code: public static String format(Date date) {
          DateFormat dateFormat = new SimpleDateFormat(DateField.FORMAT);
          return date == null ? null : dateFormat.format(date);
      }
docs: Converts the given date into a string which follows the format used by
  date fields.
  
  @param date
  The date value to format, which may be null.
  
  @return
  The formatted date, or null if the provided time was null.