How to read a DateTime field from a MDB file



I use this type of coding to read from an MDB file.

CnnStr := Format('Provider=Microsoft.Jet.OLEDB.4.0;Data Source=%s;',
['MyMDBDataBase.mdb']);
cnn := CoConnection.Create;
cnn.Open(CnnStr, '', '', 0);

// Open Events
SQL := 'SELECT ADate,ChoiceID,EvCode,[1st],[2nd],[3rd],Name FROM
Q_ClassAssign ORDER BY ChoiceID';
rs := CoRecordset.Create;
rs.CursorLocation := adUseClient;
rs.Open(SQL, cnn, adOpenDynamic, adLockOptimistic, adCmdText);

while not rs.EOF do begin //iterate
Event := VarToStr(rs.Fields.Item['EvCode'].Value);
Date := VartoDateTime(rs.Fields.Item['ADate'].Value);


I'm getting a varient error with the last line. How can I read a DateTime
variable?


.