procedure TForm1.Button1Click(Sender: TObject);
var
File_Name: string;
DateTimeStamp: integer;
Date_Time: TDateTime;
begin
File_Name := 'c:\mydocuments\test.doc';
DateTimeStamp := FileAge(File_Name);
// FileAge returns -1 if file not found
if DateTimeStamp < 0 then
ShowMessage('File not found')
else begin
// Convert to TDateTime format
Date_Time := FileDateToDateTime(DateTimeStamp);
Label1.Caption := DateToStr(Date_Time);
Label2.Caption := TimeToStr(Date_Time);
end;
end;
|
|
| Crash Course Delphi | Become member of the DelphiLand Club and get our Crash Course Delphi, plus the fully commented source code of numerous projects, plus guaranteed answers from our Q/A Forum. Membership is for life! |
TOP DelphiLand
Club Membership DC Library Forum Forum
Archives TURBO
Delphi Explorer FAQ
Crash Course Delphi Tips Source
Code Downloads Links
© Copyright 1999-2006
Studiebureau Festraets