Delphi获取文件日期

hFile := FileOpen(strs[i], fmOpenRead);


if (hFile<0) or (FileGetDate(hFile)=-1) then
begin
ShowMessage('添加文件失败,请重试!');
Exit;
end;

 

DT := FileDateToDateTime(FileGetDate(hFile));
s := FormatDateTime('yyyy-mm-dd hh:nn:ss', DT);
FileClose(hFile);

 

转自:http://hi.baidu.com/nsgtao/item/0dc5b3d6e5d0d8b832db906b

posted @ 2013-12-22 11:03  stma  阅读(686)  评论(0)    收藏  举报