Previous: GetFAttr procedure To the Table of Content Next: GetIntVec procedure

- 4.24.2.19 -
Standard Units
Dos Unit
Dos Unit Procedures and Functions

GetFTime procedure

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


Previous: GetFAttr procedure To the Table of Content Next: GetIntVec procedure
GetFAttr procedure Table of Content GetIntVec procedure

- 4.24.2.19 -