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;

相关阅读 >>

Delphi使用project manager添加一个java库到你的应用程序

Delphi f1026 file not found: ''quickrpt.dcu''解决方法

Delphi 无法调用cmd nbtstat命令解决办法

wmi使用的win32_类库名

Delphi一个综合实用的单元

Delphi源码一个对字符加密解密的实例

Delphi xe android 调试错误:connection closed gracefully

Delphi原生方法取得文件的md5

Delphi中tframe组件的使用

Delphi twebbrowser出现 method pastehtml not supported by automation object 解决方法

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



打赏

取消

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

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

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

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

评论

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