by "Maarten Wiltink" <maarten@[EMAIL PROTECTED]
>
Jun 23, 2008 at 02:14 PM
"jg07" <jg07@[EMAIL PROTECTED]
> wrote in message
news:485f8c3f$0$931$ba4acef3@[EMAIL PROTECTED]
> var
> resul:Tsearchrec;
> dat:Tdatetime;
>
> begin
> findfirst('C:\*.*',$01,resul);
> dat:= FileDateToDateTime(resul.time);
> end;
>
> Le compilateur affiche un message d'erreur
> "Exception.....etc...Argument incorrect pour l'encodage de date"
Exceptions happen at runtime, not while compiling.
The types in your code appear to be correct.
Try checking the return code of FindFirst.
Code:=FindFirst(...); if (Code=0) then ...;
Your results may be thrown off by the $01 in the call to FindFirst.
I find it safest to always pass faAnyFile and check the attributes
of the files returned.
Groetjes,
Maarten Wiltink