我在设计一个过程是,用到了显示时间的函数
具体如下:
procedure TFMain.LocalChangeDirExecute(Sender: TObject);
var
sr: TSearchRec;
Item : TListItem;
begin
SetCurrentDir(LocalPath);
LocalFileList.Clear;
if FindFirst('*', faDirectory, sr) = 0 then
begin
repeat
if ((sr.Attr and faDirectory) = sr.Attr) and (sr.Name <> '.') and (sr.Name <> '..') then
begin
Item:=LocalFileList.Items.Add;
Item.ImageIndex:=0;
Item.Caption:=sr.Name;
Item.SubItems.Add('文件夹');
Item.SubItems.Add(IntToStr(sr.Size));
Item.SubItems.Add(DateToStr(sr.Time));
end;
until FindNext(sr) <> 0;
FindClose(sr);
end;其他的属性都正确,可是时间显示老是有问题,请问谁能帮忙解释一下
具体如下:
procedure TFMain.LocalChangeDirExecute(Sender: TObject);
var
sr: TSearchRec;
Item : TListItem;
begin
SetCurrentDir(LocalPath);
LocalFileList.Clear;
if FindFirst('*', faDirectory, sr) = 0 then
begin
repeat
if ((sr.Attr and faDirectory) = sr.Attr) and (sr.Name <> '.') and (sr.Name <> '..') then
begin
Item:=LocalFileList.Items.Add;
Item.ImageIndex:=0;
Item.Caption:=sr.Name;
Item.SubItems.Add('文件夹');
Item.SubItems.Add(IntToStr(sr.Size));
Item.SubItems.Add(DateToStr(sr.Time));
end;
until FindNext(sr) <> 0;
FindClose(sr);
end;其他的属性都正确,可是时间显示老是有问题,请问谁能帮忙解释一下
解决方案 »
- delhi 字符串变量
- 如何实现时间段的查询?
- TChart问题
- 找不到DAQDeviceLib_TLB.dcu ?
- 请大家谈谈D7和D8的区别??小弟想学Delphi,但不知学哪个版本好?请各位介绍一下!!!
- 大家帮我做一个测试 把adoconnection1给free后 如何从新调用建立它 并保持它的属性不变
- 有关delphi 三层数据库程序开发的问题
- D7+ADO+MSSQL2K 参数与双引号混用
- 如何使得图片(TImage)半透明显示? 想让图片有朦胧的感觉
- ***这是为什么?***//*
- 帮忙我应该如何处理这个问题。。。。。。。。。。。。。。。。。。。。。
- delphi做的ocx不能在vb中调用
Item.SubItems.Add(DateToStr(FileDateToDateTime(sr.Time)));