code: public static Date convertToDate(Object obj) {
  		if (obj == null)
  			return null;
  		if (obj instanceof Date)
  			return (Date) obj;
  		if (obj instanceof Number)
  			return new Date(((Number)obj).longValue());
  		if (obj instanceof String) {
  			StringTokenizer st = new StringTokenizer((String) obj, " -/:,.+");
  			String s1 = "";
  			if (!st.hasMoreTokens())
  				return null;
  			s1 = st.nextToken();
  			if (s1.length() == 4 && Character.isDigit(s1.charAt(0)))
  				return getYYYYMMDD(st, s1);
  			// skip Day if present.
  			if (daysTable.containsKey(s1)) {
  				if (!st.hasMoreTokens())
  					return null;
  				s1 = st.nextToken();
  			}
  			if (monthsTable.containsKey(s1))
  				return getMMDDYYYY(st, s1);
  
  			if (Character.isDigit(s1.charAt(0)))
  				return getDDMMYYYY(st, s1);
  			return null;
  		}
  		throw new RuntimeException("Primitive: Can not convert " + obj.getClass().getName() + " to int");
  	}
docs: try read a Date from a Object