function getstocknewExpectRdate(stock,rdate);
begin
t:=select * from infotable 128 of stock where ["截止日"]=rdate end;
if not istable(t) then return 0;
if t[0,"实际披露日期"] then v:= t[0,"实际披露日期"];
else if t[0,"第三次变更日期"] then v:= t[0,"第三次变更日期"];
else if t[0,"第二次变更日期"] then v:= t[0,"第二次变更日期"];
else if t[0,"第一次变更日期"] then v:= t[0,"第一次变更日期"];
else v:= t[0,"首次预约日期"];
return v;
end