Previous: 4.74.2.18. GetFAttr procedure To the Table of Contents Next: 4.74.2.20. GetIntVec procedure
4.74.2.18. GetFAttr procedure Table of Contents 4.74.2.20. GetIntVec procedure

- 4.74.2.19. -
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.19. GetFTime procedure


4.74.2.19. 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 WinDos;
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: 4.74.2.18. GetFAttr procedure To the Table of Contents Next: 4.74.2.20. GetIntVec procedure
4.74.2.18. GetFAttr procedure Table of Contents 4.74.2.20. GetIntVec procedure

- 4.74.2.19. -