string s="20030428" int no; string c = IntToStr(no); int i = 4- leangth(c); int j; for j = 1 to i do s =s + "0"; s = s+ c; return s;
var s,d,l,n:string; begin d:=copy('20030428002',1,8); s:=copy('20030428002',9,3); if d<>formatdatetime('yyyymmdd',now) then n:=formatdatetime('yyyymmdd',now)+'001' else begin l:='00'+inttostr(inc(strtoint(s))); n:=d+copy(l,length(l)-2,3); end;
var s,d,j,n:string; begin d:=copy('20030428002',1,8); s:=copy('20030428002',9,3); if d<>formatdatetime('yyyymmdd',now) then n:=formatdatetime('yyyymmdd',now)+'001' else begin j:=copy(inttostr(strtoint('1'+s)+1),2,3); n:=d+j; end;
int no;
string c = IntToStr(no);
int i = 4- leangth(c);
int j;
for j = 1 to i do
s =s + "0";
s = s+ c;
return s;
begin
d:=copy('20030428002',1,8);
s:=copy('20030428002',9,3);
if d<>formatdatetime('yyyymmdd',now) then
n:=formatdatetime('yyyymmdd',now)+'001'
else
begin
l:='00'+inttostr(inc(strtoint(s)));
n:=d+copy(l,length(l)-2,3);
end;
s,d,j,n:string;
begin
d:=copy('20030428002',1,8);
s:=copy('20030428002',9,3);
if d<>formatdatetime('yyyymmdd',now) then
n:=formatdatetime('yyyymmdd',now)+'001'
else
begin
j:=copy(inttostr(strtoint('1'+s)+1),2,3);
n:=d+j;
end;