code: public static DateTime toDateAdvanced(Object o, TimeZone timeZone, DateTime defaultValue) {
  	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(defaultValue);
  	}
  	else if (o instanceof String) return toDateAdvanced(o.toString(), timeZone, defaultValue);
  	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 toDateAdvanced(((ObjectWrap) o).getEmbededObject(defaultValue), timeZone, defaultValue);
  	return defaultValue;
      }
docs: converts a Object to a DateTime Object (Advanced but slower), returns null if invalid string
  
  @param o Object to Convert
  @param timeZone
  @param defaultValue
  @return Date Time Object