PageContext pc = ThreadLocalPageContext.get();
if(pc!=null) {
Member member = getMember(pc,KeyConstants.__toDateTime,true,superAccess);
//Object o = get(pc,"_toDateTime",null);
if(member instanceof UDFPlus) {
UDFPlus udf = (UDFPlus)member;
if(udf.getReturnType()==CFTypes.TYPE_DATETIME && udf.getFunctionArguments().length==0) {
try {
return DateCaster.toDateAdvanced(_call(pc, KeyConstants.__toDateTime,udf, null, new Object[0]),true,pc.getTimeZone(),defaultValue);
} catch (PageException e) {
return defaultValue;