code: public static String format(Object data) {
  
          if (data == null) {
              return null;
          }
          Class<?> clazz = data.getClass();
          if (clazz.equals(Date.class)) {
              return format(((Date)data).getTime());
          }
          return data.toString();
      }
docs: Formats the given data into a string value depending on the data type.<p>
  
  @param data the data to format
  
  @return a string representation of the given data