However, TSearchRec.Time is a longint. That is not a date format.
TDateTime is compatible with the type "extended", not "longint". I
thought the longint might be the value in seconds. However, converting
seconds to date by a divisor of 24*60*60 yields incorrect dates and
times.
Delphi's 16-bit online help offers no clues.
Any ideas?
Email me. I appreciate it and reply to every email.
Matthew
I think this could example should give you an answer
var
dt: TDateTime;
sr: TSearchrec;
y, d, m, h, min, sec, msec: word;
begin
......................
dt := fileDateToDateTime(sr.time);
decodeDate( dt, y, d, m );
decodeTime( dt, h, min, sec, msec );
end;
Regards, Enzo
Matthew wrote in article <338b7...@news.power.net.uk>...
var
dt: TDateTime;
sr: TSearchrec;
y, d, m, h, min, sec, msec: word;
begin
.....................
dt := fileDateToDateTime(sr.time);
decodeDate( dt, y, d, m );
decodeTime( dt, h, min, sec, msec );
end;
Regards, Enzo
===========
Enzo Arlati , e.ar...@sinergy.it
Sinergy srl via Modigliani 45 Segrate 20090 (MI) Italy
www -> http://arlati.sinergy.it/
===================================
Well, that's not really true, but I have blind spots myself.
Search under filedate...
Andrew
>TSearchRec is used to find and identify a particular file, its size
>and time stamp. FindFirst places the result in TSearchRec, e.g
>MySearchRec.Time.
>
>However, TSearchRec.Time is a longint. That is not a date format.
>TDateTime is compatible with the type "extended", not "longint". I
>thought the longint might be the value in seconds. However, converting
>seconds to date by a divisor of 24*60*60 yields incorrect dates and
>times.
>
>Delphi's 16-bit online help offers no clues.
>
>Any ideas?
>
>Email me. I appreciate it and reply to every email.
>Matthew
>
Matthew,
Look at FileDateToDateTime in the SysUtils unit.
hth,
David
David A. Schweizer
iec ProGAMMA, The Netherlands
d.a.sc...@gamma.rug.nl
HTH,
--
Paul Motyer
Soft Stuff, Croydon, Australia, 3136
Matthew <Com...@lottery.powernet.co.uk > wrote in article
<338b7...@news.power.net.uk>...