- 4.24.2.35. -
Table of Contents
4. Standard Units
4.24. DOS - MSDOS support unit
4.24.2. DOS Unit Procedures and Functions
4.24.2.35. UnpackTime
4.24.2.35. UnpackTime
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
Dos;
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.
- 4.24.2.35. -