Autor Beitrag
Andreas Pfau
ontopic starontopic starontopic starontopic starontopic starontopic starontopic starofftopic star
Beiträge: 997



BeitragVerfasst: So 22.06.03 16:45 
Hallo,

also, dieser Wert ist eine TFileTime-Struktur, die gibt die Anzahl der vergangenen 100-Nanosekunden-Intervallen seit dem 1. Januar 1601 zurück (he, gib' dir das mal!). Daraus machst du:
ausblenden Delphi-Quelltext
1:
2:
3:
4:
5:
6:
7:
8:
9:
10:
11:
12:
13:
14:
15:
16:
17:
18:
19:
20:
var
  Wfd: Win32_Find_Data;
  Hff: Cardinal;
  Ft, Ft2: TFileTime;
  St: TSystemTime;
  Dt: TDateTime;
begin
  Hff := FindFirstfile(PChar('*.*'), Wfd);
  FindNextFile(Hff, Wfd);
  FindNextFile(Hff, Wfd);

  // Beginn des Umwandlungs-Codes
  Ft := Wfd.ftCreationTime;
  FileTimeToLocalFileTime(Ft, Ft);
  FileTimeToSystemTime(Ft, St);
  Dt := SystemTimeToDatetime(St);
  // Ende des Umwandlungs-Codes
  ShowMessageFmt('Erstellt am %s um %s Uhr', [DateToStr(Dt),  TimeToStr(Dt)]);

  Windows.FindClose(Hff);


OK, das war's, wenn auch über Umwege, aber anders is' nix.[/code]

_________________
Life is a bad adventure, but the graphic is really good!