community.borland.com

Article #15541: How to get a file's date and time stamp.

 Technical Information Database

TI541D.txt   How to get a file's date and time stamp.
Category   :General Programming
Platform    :All
Product    :Delphi  All

Description:
Q:  How do I get a file's date and time stamp?

A:

function GetFileDate(TheFileName: string): string;
var
  FHandle: integer;
begin
  FHandle := FileOpen(TheFileName, 0);
  try
    Result := DateTimeToStr(FileDateToDateTime(FileGetDate(FHandle)));
  finally
    FileClose(FHandle);
  end;
end;



Reference:


7/16/98 4:33:47 PM
 

Last Modified: 01-SEP-99