delphi Yesterday、Today、Tomorrow - 昨天、今天、明天


本文整理自网络,侵删。

 Yesterday、Today、Tomorrow - 昨天、今天、明天
unit Unit1;

interface

uses
Windows, Messages, SysUtils, Variants, Classes, Graphics, Controls, Forms,
Dialogs;

type
TForm1 = class(TForm)
procedure FormCreate(Sender: TObject);
end;

var
Form1: TForm1;

implementation

{$R *.dfm}

uses DateUtils;

procedure TForm1.FormCreate(Sender: TObject);
var
t1,t2,t3: TDateTime;
begin
t1 := Yesterday;
t2 := Today; //同 SysUtils.Date;
t3 := Tomorrow;


ShowMessageFmt('%s, %s, %s', [DateToStr(t1), DateToStr(t2), DateToStr(t3)]);
{2009-5-20, 2009-5-21, 2009-5-22}
end;

end.

相关阅读 >>

Delphi 正则提取txt中的email 数据

Delphi fmx输出彩色文本

Delphi中使用低层钩子 屏蔽win、ctrl+esc、alt+tab、alt+f4

Delphi 当前日期的加减运算

Delphi侦测条码枪方式

Delphi xe 在andriod程序中获取外置sd卡根目录

Delphi 读取软件卸载信息和桌面图标列表

Delphi firedac 下的 sqlite 创建数据库

Delphi form工程创建

Delphi pagecontrol不�@示tab方式

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



打赏

取消

感谢您的支持,我会继续努力的!

扫码支持
扫码打赏,您说多少就多少

打开支付宝扫一扫,即可进行扫码打赏哦

分享从这里开始,精彩与您同在

评论

管理员已关闭评论功能...