code: public static DateTime toDateSimple(Object o, short convertingType, boolean alsoMonthString, TimeZone timeZone) throws PageException {
  	if (o instanceof DateTime) return (DateTime) o;
  	else if (o instanceof Date) return new DateTimeImpl((Date) o);
  	else if (o instanceof Castable) return ((Castable) o).castToDateTime();
  	else if (o instanceof String) return toDateSimple(o.toString(), convertingType, alsoMonthString, timeZone);
  	else if (o instanceof Number) return util.toDateTime(((Number) o).doubleValue());
  	else if (o instanceof Calendar) return new DateTimeImpl((Calendar) o);
  	else if (o instanceof ObjectWrap) return toDateSimple(((ObjectWrap) o).getEmbededObject(), convertingType, alsoMonthString, timeZone);
  	else if (o instanceof Calendar) {
  	    return new DateTimeImpl((Calendar) o);
  	}
  
  	if (o instanceof Component) throw new ExpressionException("can't cast component [" + ((Component) o).getAbsName() + "] to date value");
  
  	throw new ExpressionException("can't cast [" + Caster.toTypeName(o) + "] to date value");
      }
docs: converts a Object to a DateTime Object, returns null if invalid string
  
  @param o Object to Convert
  @param convertingType one of the following values: - CONVERTING_TYPE_NONE: number are not
  converted at all - CONVERTING_TYPE_YEAR: integers are handled as years -
  CONVERTING_TYPE_OFFSET: numbers are handled as offset from 1899-12-30 00:00:00 UTC
  @param timeZone
  @return coverted Date Time Object
  @throws PageException