procedure TForm1.DateToChina(D: TDate;
var strY, strM, strD: string);
function NumTOstr(num: integer): string;
var
strNum,str:string;
i:integer;
begin
Result:='';
strNum:=IntToStr(Num);
for i:=1 to length(strNum)do
begin
case StrToInt(copy(strNum,i,1)) of
1:Str:='一';
2:Str:='二';
3:Str:='三';
4:Str:='四';
5:Str:='五';
6:Str:='六';
7:Str:='七';
8:Str:='八';
9:Str:='九';
0:Str:='零';
end;
Result:=Result+Str;
end;
end;
var
Year, Month, Day:Word;
begin
DecodeDate( Date, Year, Month, Day );
strY:=NumTOstr(Year);
strM:=NumTOstr(Month);
strD:=NumTOstr(Day);
end;
//----------------------
例子:
procedure TForm1.Button1Click(Sender: TObject);
var
Year, Month, Day:string;
begin
DateToChina( Date, Year, Month, Day );
Label1.Caption:=Year;
Label2.Caption:=Month;
Label3.Caption:=Day;
end;
//-----------------------------------------
以上再作一点修改,就和你的要求一样了。