code: @Override
    public Date convert(Object value) {
  
      if (value instanceof Calendar) {
        return ((Calendar) value).getTime();
      }
      else if (value instanceof Date) {
        return (Date) value;
      }
      else if (value instanceof Number) {
        return new Date(((Number) value).longValue());
      }
      else if (value instanceof String) {
  
        String valueString = String.valueOf(value).trim();
  
        try {
          return StringUtils.isDigits(valueString)
            ? new Date(Long.parseLong(valueString))
            : new Date(getDateFormat().parse(valueString).getTime());
        }
        catch (NumberFormatException | ParseException cause) {
          throw newConversionException(cause, "[%s] is not a valid date/time", value);
        }
      }
      else {
        return super.convert(value);
      }
    }
docs: Converts an {@link Object} of {@link Class type S} into an {@link Object} of {@link Class type T}.
  
  @param value {@link Object} of {@link Class type S} to convert.
  @return the converted {@link Object} of {@link Class type T}.
  @throws ConversionException if the {@link Object} cannot be converted.
  @see org.cp.elements.data.conversion.ConversionService#convert(Object, Class)
  @see #convert(Object, Class)