- 4.24.2.19. -
Table of Contents
4. Standard Units
4.24. DOS - MSDOS support unit
4.24.2. DOS Unit Procedures and Functions
4.24.2.19. GetFTime
4.24.2.19. GetFTime
Targets: MS-DOS, OS/2, Win32
Dos Unit, WinDos Unit
Returns the date and time a file was last written.
Declaration:
procedure GetFTime(var F; var Time: Longint);
Remarks:
The file associated with F must be open. Time can be unpacked
with UnPackTime. Errors are reported in DosError, a variable
defined in the Dos unit.
Example:
uses Dos;
var
Fi : Text;
Time: Longint;
DT : DateTime;
begin
Assign(Fi, 'DATA.BAK');
Reset(Fi);
GetFTime(Fi, Time);
UnPackTime(Time, DT);
WriteLn('Year: ', DT.Year);
WriteLn('Month: ', DT.Month);
WriteLn('Date: ', DT.Day);
Close(Fi);
end.
See also:
SetFTime
- 4.24.2.19. -