GetDateTimeString 返回一个字符串 - 为什么在将输出分配给变量时会出现类型不匹配?

pet*_*ell 6 inno-setup type-mismatch

当尝试编译以下代码时,我收到引用包含 GetDateTimeString 的行的“类型不匹配”。这个函数应该输出一个字符串(根据 Inno Setup 帮助),我试图将输出分配给字符串类型的变量......为什么我会得到类型不匹配?

{ Compile the string for the Beveled Text label }
function get_bev_label(Param: String) : String;
var 
datetime : String;
begin
  datetime :=  GetDateTimeString ('mmmm/d/yyyy', '', '');
  result := ('Build Date ' + datetime + ' - All Rights Reserved');
end;
Run Code Online (Sandbox Code Playgroud)