本文整理自网络,侵删。
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);beginmemo1.text:=DateTimetostr(NowGMT);
end;
相关阅读 >>
Delphi的字符截取函数leftstr,midstr,rightstr的介绍以及字符串拆分
Delphi tms web core直接从html&css设计的页面布局
Delphi 取得开机时间 开机时间总长度(可精确到秒,分钟等)
更多相关阅读请进入《Delphi》频道 >>