code: public static DateTime toDateAdvanced(Object o, TimeZone timezone) throws PageException {
  	if (o instanceof Date) {
  	    if (o instanceof DateTime) return (DateTime) o;
  	    return new DateTimeImpl((Date) o);
  	}
  	else if (o instanceof Castable) return ((Castable) o).castToDateTime();
  	else if (o instanceof String) {
  	    DateTime dt = toDateAdvanced((String) o, timezone, null);
  	    if (dt == null) throw new ExpressionException("can't cast [" + o + "] to date value");
  	    return dt;
  	}
  	else if (o instanceof Number) return util.toDateTime(((Number) o).doubleValue());
  	else if (o instanceof ObjectWrap) return toDateAdvanced(((ObjectWrap) o).getEmbededObject(), timezone);
  	else if (o instanceof Calendar) {
  
  	    return new DateTimeImpl((Calendar) o);
  	}
  	throw new ExpressionException("can't cast [" + Caster.toClassName(o) + "] to date value");
      }
docs: converts a Object to a DateTime Object (Advanced but slower)
  
  @param o Object to Convert
  @param timezone
  @return Date Time Object
  @throws PageException