> I am assigning a date time from an editbox to a TDateTime object
I would suggest using a TDateTimePicker instead.
> if the operator makes an error I want to catch the error. Can
someone
> tell me how to use Try and Catch to do this.
The same way you use try..catch for any other kind of exception:
try
{
timex = StrToDateTime(Edit4->Text);
}
catch(const EConvertError &)
{
// do something ...
}
Or:
try
{
timex = StrToDateTime(Edit4->Text);
}
catch(const Exception &)
{
// do something ...
}
> No matter what I do, the catch does not work
Yes, it does.
Gambit