希望高手考虑到2000年以后的问题,  还有就是十月份的显示 在线等待哈哈谢谢帮忙100分相送

解决方案 »

  1.   

    formatdatetime('dddddddd',strtodate('97-02-03'));
      

  2.   

    procedure TForm1.Button1Click(Sender: TObject);
    var
      year,month,day:word;
      s:string;
      present:TDateTime;
    begin
      present:=now;
      decodedate(present,year,month,day);
      s:=form1.getdate(year,month,day);
      showmessage(s);
    end;function TForm1.getdate(year, month, day: word): string;
    var
      s,s1,s2,s3,s4,s5,s6:string;
    begin
      s:=inttostr(year);
      if s[1]='0' then
        s1:='零';
      if s[1]='1' then
        s1:='一';
      if s[1]='2' then
        s1:='二';
      if s[1]='3' then
        s1:='三';
      if s[1]='4' then
        s1:='四';
      if s[1]='5' then
        s1:='五';
      if s[1]='6' then
        s1:='六';
      if s[1]='7' then
        s1:='七';
      if s[1]='8' then
        s1:='ba';
      if s[1]='9' then
        s1:='九';
      if s[4]='0' then
        s2:='零';
      if s[4]='1' then
        s2:='一';
      if s[4]='2' then
        s2:='二';
      if s[4]='3' then
        s2:='三';
      if s[4]='4' then
        s2:='四';
      if s[4]='5' then
        s2:='五';
      if s[4]='6' then
        s2:='六';
      if s[4]='7' then
        s2:='七';
      if s[4]='8' then
        s2:='八';
      if s[4]='9' then
        s2:='九';
      if s[2]='0' then
        s3:='零';
      if s[2]='1' then
        s3:='一';
      if s[2]='2' then
        s3:='二';
      if s[2]='3' then
        s3:='三';
      if s[2]='4' then
        s3:='四';
      if s[2]='5' then
        s3:='五';
      if s[2]='6' then
        s3:='六';
      if s[2]='7' then
        s3:='七';
      if s[2]='8' then
        s3:='八';
      if s[2]='9' then
        s3:='九';
      if s[3]='0' then
        s4:='零';
      if s[3]='1' then
        s4:='一';
      if s[3]='2' then
        s4:='二';
      if s[3]='3' then
        s4:='三';
      if s[3]='4' then
        s4:='四';
      if s[3]='5' then
        s4:='五';
      if s[3]='6' then
        s4:='六';
      if s[3]='7' then
        s4:='七';
      if s[3]='8' then
        s4:='ba';
      if s[3]='9' then
        s4:='九';
      case month of
      1:s5:='一';
      2:s5:='二';
      3:s5:='三';
      4:s5:='四';
      5:s5:='五';
      6:s5:='六';
      7:s5:='七';
      8:s5:='八';
      9:s5:='九';
      10:s5:='十';
      11:s5:='十一';
      12:s5:='十二';
      end;
      case day of
      1:s6:='一';
      2:s6:='二';
      3:s6:='三';
      4:s6:='四';
      5:s6:='五';
      6:s6:='六';
      7:s6:='七';
      8:s6:='八';
      9:s6:='九';
      10:s6:='十';
      11:s6:='十一';
      12:s6:='十二';
      13:s6:='十三';
      14:s6:='十四';
      15:s6:='十五';
      16:s6:='十六';
      17:s6:='十七';
      18:s6:='十八';
      19:s6:='十九';
      20:s6:='二十';
      21:s6:='二十一';
      22:s6:='二十二';
      23:s6:='二十三';
      24:s6:='二十四';
      25:s6:='二十五';
      26:s6:='二十六';
      27:s6:='二十七';
      28:s6:='二十八';
      29:s6:='二十九';
      30:s6:='三十';
      31:s6:='三十一';
      end;
      result:=s1+s4+s3+s2+'年'+s5+'月'+s6+'日';
    end;
      

  3.   

    想变中文的,你得用很多CASE来判断吧。自己写吧
      

  4.   

    Formatdatetime('DDDDDDDD',StrToDate('你的时间'));
      

  5.   

    function c_formatdate(date:Tdate):string;//将日期转换为大写
    var year,month,day:word;
        y,m,d:string;
        yr,mr,dr:string;
        i:integer;
    begin
      decodedate(date,year,month,day);
      yr:='';
      mr:='';
      dr:='';
      y:=inttostr(year);
      m:=inttostr(month);
      d:=inttostr(day);
      //对年度进行处理
      for i:=1 to 4 do
      begin
        case strtoint(y[i]) of
        1:yr:=yr+'一';
        2:yr:=yr+'二';
        3:yr:=yr+'三';
        4:yr:=yr+'四';
        5:yr:=yr+'五';
        6:yr:=yr+'六';
        7:yr:=yr+'七';
        8:yr:=yr+'八';
        9:yr:=yr+'九';
        0:yr:=yr+'0';
        end;//end case;
      end;
        case strtoint(m) of
        1:mr:=mr+'一';
        2:mr:=mr+'二';
        3:mr:=mr+'三';
        4:mr:=mr+'四';
        5:mr:=mr+'五';
        6:mr:=mr+'六';
        7:mr:=mr+'七';
        8:mr:=mr+'八';
        9:mr:=mr+'九';
        10:mr:=mr+'十';
        11:mr:=mr+'十一';
        12:mr:=mr+'十二';
        end;//end case;
      if length(d)=2 then
        begin
          case strtoint(d[1]) of
          1:dr:=dr+'十';
          2:dr:=dr+'二十';
          3:dr:=dr+'三十';
          end;//end case;
          case strtoint(d[2]) of
          1:dr:=dr+'一';
          2:dr:=dr+'二';
          3:dr:=dr+'三';
          4:dr:=dr+'四';
          5:dr:=dr+'五';
          6:dr:=dr+'六';
          7:dr:=dr+'七';
          8:dr:=dr+'八';
          9:dr:=dr+'九';
          end;//end case;
        end
        else
        begin
          case strtoint(d) of
          1:dr:=dr+'一';
          2:dr:=dr+'二';
          3:dr:=dr+'三';
          4:dr:=dr+'四';
          5:dr:=dr+'五';
          6:dr:=dr+'六';
          7:dr:=dr+'七';
          8:dr:=dr+'八';
          9:dr:=dr+'九';
          end;//end case;
        end;
    result:=yr+'年'+mr+'月'+dr+'日';
    end;