用GetFileTime也可以:<br><br>var<br> h:HFILE;<br> ofs:OFSTRUCT;<br> local,at:FILETIME;<br> syst:SYSTEMTIME;<br>begin<br>h:=OpenFile(PChar(ParamStr(0)),ofs,OF_READ );//ParamStr(0)就是执行的exe文件自己<br>if(h=HFILE_ERROR)then<br> RaiseLastWin32Error();<br>GetFileTime(h,nil,nil,@at);<br>FileTimeToLocalFileTime(at,local);<br>FileTimeToSystemTime(local,syst);<br>ShowMessage(Format('%d-%d-%d %d:%d:%d',[syst.wYear,syst.wMonth,syst.wDay,syst.wHour,syst.wMinute,syst.wSecond]));<br>_lclose(h);<br>end;<br>