Yes I had to go back and look at my code. I call the function (which is in a C DLL) like this
iresult:=GetDateTime(@year,@month,@day,@hour,@min,@sec) if the result is =0 then its ok Where the problem IS is that the variables can be zero and I am doing an encodedate and encodetime and the problem IS that they require that the values of the variables be >1 I think tho, everyone is missing the point of my question. The problem above is handled fine in my code....the code is not the issue, the issue or rather question I was asking IS, is there away OTHER than adding EConvertError to the exceptions to ignore list in the Language exceptions tab of the debugging menu item in the IDE to stop the program telling me there is an error which requires me to press the ok button and the F9 at the line the tryies to do the encodedate and encodetime ? and one that also means I can still have the stop on delphi exptions turned on. Thanks, Jeremy Coulter -----Original Message----- From: [EMAIL PROTECTED] [mailto:[EMAIL PROTECTED]]On Behalf Of Nello Sestini Sent: Sunday, 30 September 2001 20:57 To: Multiple recipients of list delphi Subject: Re: [DUG]: Break on exception > I have a component that gets a value back from a DLL. > The value is a Date BUT it can sometimes be just zero. > > Do I go > > try > myDate:=GetDateFromDll; > except > myDate:=now > end; what are the types of myDate and GetDateFromDll? TDateTime? normally you don't get an exception if you assign a TDateTime value (even if it's zero). I just tried this: procedure test; var mydate:TDateTime; begin mydate:=0.0; end; and it doesn't raise an exception. What you are describing sounds like something that happens when you try to convert a String to a TDate via StrToDate or something like that. Am I missing something? -ns --------------------------------------------------------------------------- New Zealand Delphi Users group - Delphi List - [EMAIL PROTECTED] Website: http://www.delphi.org.nz To UnSub, send email to: [EMAIL PROTECTED] with body of "unsubscribe delphi" Web Archive at: http://www.mail-archive.com/delphi%40delphi.org.nz/ --------------------------------------------------------------------------- New Zealand Delphi Users group - Delphi List - [EMAIL PROTECTED] Website: http://www.delphi.org.nz To UnSub, send email to: [EMAIL PROTECTED] with body of "unsubscribe delphi" Web Archive at: http://www.mail-archive.com/delphi%40delphi.org.nz/