code: public DateTime toDateTime(Config config, Element el, String attributeName) {
  	String str = el.getAttribute(attributeName);
  	if (str == null) return null;
  	return DateCaster.toDateAdvanced(str, ThreadLocalPageContext.getTimeZone(config), null);
      }
docs: reads a XML Element Attribute ans cast it to a DateTime Object
  
  @param config
  @param el XML Element to read Attribute from it
  @param attributeName Name of the Attribute to read
  @return Attribute Value