获取系统当前日期时间

procedure TForm1.Button1Click(Sender: TObject);
begin
Label1.Caption := FormatDateTime('hh:nn:ss',Now());
Label2.Caption := DateTimeToStr(Date());
Label3.Caption := DateTimeToStr(now());
Label4.Caption := FormatDateTime('yyyy年mm月dd日 hh时nn分ss秒',now());
end;

 

 

posted @ 2020-01-17 14:24  DonVin  阅读(240)  评论(0编辑  收藏  举报