It would help to know where the file is coming from and where these values are coming from. If this is all Delphi, there would likely be a function somewhere to do this. But if it's something different, it would be necessary to know where the file is coming from and what format it is in in order to convert the value.
These values are coming from a file within the recyclebin of Windows Vista. The date shown is the date of deletion of the file.
Hexadecimal view 00 19 2F 8E 45 14 C9 01
This is the code I use to get the result.
myfile := TFileStream.Create('c:\temp\$IVVY9BY.xml', fmOpenRead or fmShareDenyWrite);
try
if (myfile.Seek(16, soFromBeginning) = 16) And
(myfile.Read(i, Sizeof(i)) = Sizeof(i)) then
showmessage(Format('Value is %d', ))
else
ShowMessage('Problem reading value');
When I use the above code I get the int64 but the problem is converting this to a timestamp ?
Or do I have to use another piece of code to get the timestamp ?
I believe WIndows still stores time as a type called SystemTime and Delphi works primarily through tDateTime (although there is also The TimeStamp format). The function SytemTimetoDateTime (or SystemTimeToTimeStamp) in SysUtils will make the conversion. from there you can convert to strings etc. Give it a try.
This site uses cookies to help personalise content, tailor your experience and to keep you logged in if you register.
By continuing to use this site, you are consenting to our use of cookies.