StringReplace('1999-2-3', '-', ' ', [rfReplaceAll]);

解决方案 »

  1.   

    Copy('1999-2-3',1,4)+' '+Copy('1999-2-3',6,1)+' '+Copy('1999-2-3',8,1)~~呵呵或者DeCodeDateprocedure TForm1.Button1Click(Sender: TObject);var
      Present: TDateTime;
      Year, Month, Day, Hour, Min, Sec, MSec: Word;
     begin
      Present:= Now;
      DecodeDate(Present, Year, Month, Day);
      Label1.Caption := 'Today is Day ' + IntToStr(Day) + ' of Month '
        + IntToStr(Month) + ' of Year ' + IntToStr(Year);
      DecodeTime(Present, Hour, Min, Sec, MSec);
      Label2.Caption := 'The time is Minute ' + IntToStr(Min) + ' of Hour '
        + IntToStr(Hour);
    end;
      

  2.   

    FormatDateTime('YYYY"  "MM"  "DD', Date);
      

  3.   

    还是FormatDateTime('YYYY"  "MM"  "DD', Date); 比较好!在报表中加上,给要打印的东西赋值时加上上段代码就可以了.
      

  4.   

    老兄,好像没有用嘛。
    我把FormatDateTime('YYYY"  "MM"  "DD', Date); 加在报表中日期字段的onprint了。
    为什么不行???
      

  5.   

    TDateTimeField(DataSet.FieldByName('<字段名>')).DisplayFormat := 'YYYY"  "MM"  "DD';
      

  6.   

    师弟呀!Delphi6的函数是Delphi5的两倍以上!
    你怎么不安Delphi6呢????????????
    我们写的是<<Delphi6函数大全>>!!!!!!!
    我们写不是<<Delphi5函数大全>>!!!!!!!
      

  7.   

    procedure TForm1.QRLabel1Print(sender: TObject; var Value: String);
    begin
      Value := StringReplace(Value, '-', ' ', [rfReplaceAll]);
    end;
      

  8.   

    还是zswang(伴水)(伤心中)行, 现在可以了。谢谢大家!!!
      

  9.   

    如果是用quickrpt则在mask中写入yyyy m d,应该可心解决问题!