code: public static String getFormattedObect(String date)
      {
          return date != null ? getDateByPattern(date).toString() : null;
      }
docs: Just to verify with supported types of date pattern. Get Date from given
  below formats
  
  @param date
  Date pattern
  @return date instance
  @throws PropertyAccessException
  throws only if invalid format is supplied.