Previous: 4.74.2.34. SetVerify procedure To the Table of Contents Next: 4.75. Windows - Base Windows 32-bit API interface unit
4.74.2.34. SetVerify procedure Table of Contents 4.75. Windows - Base Windows 32-bit API interface unit

- 4.74.2.35. -
Table of Contents
4. Standard Units
4.74. WinDos - MS-DOS function emulation for OS/2 and Win32
4.74.2. WinDos Unit Procedures and Functions
4.74.2.35. UnpackTime procedure


4.74.2.35. UnpackTime procedure

Targets: MS-DOS only


Dos Unit, WinDos Unit

Converts a Longint to a record.

Declaration:
procedure UnpackTime(Time: Longint; 
                      var DateTime: TDateTime);
Remarks:
UnPackTime can be used in conjunction with GetTime, FindFirst, and FindNext.
These routines return a file's four byte packed date and time stamp. To pack a DateTime record, use PackTime.

Example:
uses
  WinDos;
var
  Fi  : Text;
  Time: Longint;
  DT  : DateTime;
begin
  Assign(Fi,'USER.DOC');
  Reset(Fi);
  GetFTime(Fi,Time);
  UnPackTime(Time,DT);
  WriteLn('Year:   ',DT.Year);
  WriteLn('Month:  ',DT.Month);
  WriteLn('Date:   ',DT.Day);
  Close(Fi);
end.



Previous: 4.74.2.34. SetVerify procedure To the Table of Contents Next: 4.75. Windows - Base Windows 32-bit API interface unit
4.74.2.34. SetVerify procedure Table of Contents 4.75. Windows - Base Windows 32-bit API interface unit

- 4.74.2.35. -