procedure TForm1.Button1Click(Sender: TObject);
var Finf:_WIN32_FIND_DATAA;
fhd
WORD;
ltime:TFileTime;
stime:TSystemTime;
begin
if OpenDialog1.Execute then
begin
fhd:=FindFirstFile(PChar(OpenDialog1.FileName),Finf);
if fhd<>INVALID_HANDLE_VALUE then
begin
Windows.FindClose(fhd);
FileTimeToLocalFileTime(Finf.ftCreationTime,ltime);
FileTimeToSystemTime(ltime,stime);
Edit1.Text:='Create: '+DateTimeToStr(SystemtimeToDateTime(stime));
FileTimeToLocalFileTime(Finf.ftLastAccessTime,ltime);
FileTimeToSystemTime(ltime,stime);
Edit2.Text:='Last access: '+DateTimeToStr(SystemtimeToDateTime(stime));
FileTimeToLocalFileTime(Finf.ftLastWriteTime,ltime);
FileTimeToSystemTime(ltime,stime);
Edit3.Text:='Last write: '+DateTimeToStr(SystemtimeToDateTime(stime));
end;
end;
end;