Subject invalid date value raises exception
Author eddressel
I have a field in a database that has an invalid date and raises an
exception with the following message:

'-6406.0' is not a valid timestamp

I don't know how to get around this. I tried the following code:

lField := Dataset.FieldByName('DOB');
if lField.AsFloat < 0 then
//Assert(lField.Dataset.OnCalcFields = qryPersonCalcFields);
lField.Dataset.OnCalcFields := nil;
SetFloatValue(lField, EncodeDate(1960, 1, 1));
lField.Dataset.OnCalcFields := qryPersonCalcFields;

but in the .AsFloat property the .AsDateTime property is called, and
it raises the exception.

Is there anyway I can check the data to see if it is valid, avoiding
the exception?

Thank you,

Ed Dressel