delphi 日期加减

2022-12-17 21:22:14 作者:admin

本文整理自网络,侵删。

 function AddDays(const DateTime: TDateTime; const Days: Integer): TDateTime;begin  Result := DateTime + Days;end;
function SubtractDays(const DateTime: TDateTime; const Days: Integer): TDateTime;begin  Result := DateTime - Days;end;
procedure TForm1.FormCreate(Sender: TObject);begincaption:=datetimetostr(AddDays(date,1)); //加1天caption:=datetimetostr(SubtractDays(date,1));  //减1天end;

相关阅读 >>

Delphi10.x dpr文件

Delphi中使用临界区来让线程同步

Delphi关闭程序close,application.terminate与halt区别

Delphi下pos机控制钱箱,客显,打印机

汇编基础寄存器

Delphi tidhttp 登录网页封装

Delphi 自带的 base64 编解码函数

Delphi idhttp数据自动编码

Delphi jpg和bitmap互转转换的方法

Delphi关于dbgrid和webbrowser的焦点问题

更多相关阅读请进入《Delphi》频道 >>



在线咨询 拨打电话