var
 yy, yy1, mm, mm1, dd, dd1: string;
begDate,edDate:tdatetimemm :=inttostr(firbm-3);
dd:='1';
                  mm1 :=FormatDateTime('MM',date);
                  dd1:= FormatDateTime('DD',date);
                  yy1 := FormatDateTime('YYYY',date);
begDate := EncodeDate(strtoint(yy),StrToint(mm), 1);
edDate := EncodeDate(StrToint(yy1),StrToint(mm1), StrToint(dd1));firbm//是取月涵数
程序执行到begDate是出错。
错误为: is not a vaild integer value?