爱问知识人 爱问教育 医院库

如何delphi button1用FormatdateTime取当前系统日期,然后按钮2实现日期递增?

首页

如何delphi button1用FormatdateTime取当前系统日期,然后按钮2实现日期递增?

用label显示日期,我按钮一代码:procedure TForm1.Button1Click(Sender: TObject);
begin
Label1.Caption:=FormatdateTime('dddddd ',now);
end;
按钮二如何写代码实现按钮一取出的日期递增 并显示在label上?

提交回答

全部答案

    2018-05-16 04:50:45
  •   uses DateUtils;
    procedure TForm1。Button1Click(Sender: TObject);
    begin
    Label1。Caption:=FormatdateTime('dddddd ',now);
    end;
    procedure TForm1。
      Button2Click(Sender: TObject);
    function Replace(astr: string):string;
    begin
    astr:= StringReplace(astr,'年','-',[rfReplaceAll]) ;
    astr:= StringReplace(astr,'月','-',[rfReplaceAll]) ;
    astr:= StringReplace(astr,'日','-',[rfReplaceAll]) ;
    Result:= Copy(astr,1,Length(astr)-1);
    end;
    var
    vstr: string;
    begin
    vstr:= Replace(trim(label1。
      caption));
    Label1。Caption:=FormatdateTime('dddddd',incday( StrToDate(vstr), 1));
    end;。

    往***

    2018-05-16 04:50:45

类似问题

换一换
  • 外语学习 相关知识

  • 教育培训
  • 教育科学
  • 教育考试

相关推荐

正在加载...
最新资料 推荐信息 热门专题 热点推荐
  • 1-20
  • 21-40
  • 41-60
  • 61-80
  • 81-100
  • 101-120
  • 121-140
  • 141-160
  • 161-180
  • 181-200
  • 1-20
  • 21-40
  • 41-60
  • 61-80
  • 81-100
  • 101-120
  • 121-140
  • 141-160
  • 161-180
  • 181-200
  • 1-20
  • 21-40
  • 41-60
  • 61-80
  • 81-100
  • 101-120
  • 121-140
  • 141-160
  • 161-180
  • 181-200
  • 1-20
  • 21-40
  • 41-60
  • 61-80
  • 81-100
  • 101-120
  • 121-140
  • 141-160
  • 161-180
  • 181-200

热点检索

  • 1-20
  • 21-40
  • 41-60
  • 61-80
  • 81-100
  • 101-120
  • 121-140
  • 141-160
  • 161-180
  • 181-200
返回
顶部
帮助 意见
反馈

确定举报此问题

举报原因(必选):