[Delphi (Object Pascal)] Delphi Windows FILETIME 转换成TDateTime →→→→→进入此内容的聊天室

来自 , 2020-11-11, 写在 Delphi (Object Pascal), 查看 127 次.
URL http://www.code666.cn/view/f7b027d4
  1. function WinFileTimeToDateTime(FT: Windows.TFileTime): TDateTime;
  2. var
  3.   SysTime: Windows.TSystemTime; // stores date/time in system time format
  4. begin
  5.   // Convert file time to system time, raising exception on error
  6.   SysUtils.Win32Check(Windows.FileTimeToSystemTime(FT, SysTime));
  7.   // Convert system time to Delphi date time, raising excpetion on error
  8.   Result := SysUtils.SystemTimeToDateTime(SysTime);
  9. end;
  10. //delphi/2191

回复 "Delphi Windows FILETIME 转换成TDateTime"

这儿你可以回复上面这条便签

captcha