delphi 获取系统日期时间


本文整理自网络,侵删。

 
function NowGMT: TDateTime;
var
  ST: TSystemTime;
begin
  // This Windows API function gets system time in UTC/GMT
  // see http://msdn.microsoft.com/en-us/library/ms724390
  GetSystemTime(ST);
  Result := SystemTimeToDateTime(ST);
end;


procedure TForm1.Button1Click(Sender: TObject);
begin
memo1.text:=DateTimetostr(NowGMT);

end;

相关阅读 >>

tmsweb core 组件居中显示

Delphi常用获取系统信息的函数单元

Delphi trayicon控件,如何实现窗口最小化的时候到系统托盘?

Delphi的tservice 服务路径获取 dll中获取文件路径

Delphi 获取android package name:

Delphi firedac 另存json

Delphi 坐标截图如何实现

Delphi 多线程 开始、暂停、继续、停止

Delphi 获取局域网所有ip

Delphi tparallel.for 老外得示例代码

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



打赏

取消

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

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

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

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

评论

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