anchor.diff:  begin
     if (FDataType = ptTime) then
     begin
  -    Result := ValueAsDouble;
  +    if VarIsNull(FValue) or VarIsEmpty(FValue) then
  +      Result := 0
  +    else
  +      Result := VarToDateTime(FValue);
     end
     else
     begin
  
positive.code: begin
    if (FDataType = ptFloat) then
    begin
      Result := ValueAsDouble;
    end
    else
    begin
  
negative.code: begin
    if (FDataType = ptDate) or (FDataType = ptDateTime) then
    begin
      if VarIsNull(FValue) or VarIsEmpty(FValue) then
        Result := 0
      else
        Result := VarToDateTime(FValue);
    end
    else
    begin
  