I'm not sure if Filter property supports that complex filter conditions, you can try:
ADOTable.Filtered := False;
ADOTable.Filter := Format('CAST(FLOOR(CAST(Da
AND
CAST(FLOOR(CAST(DateTimeFi
ADOTable.Filtered := True;
but I would rather expect it to crash on ADOTable.Open
I think in your case it would be better to use ADOQuery component instead of ADOTable, then you can use:
ADOQuery.SQL.Text := Format('SELECT * FROM TABLE1
WHERE
CAST(FLOOR(CAST(DateTimeFi
AND
CAST(FLOOR(CAST(DateTimeFi
ziolko.
Main Topics
Browse All Topics





by: rfwoolfPosted on 2008-05-07 at 00:54:39ID: 21513974
Hmm... sorry if I'm wrong, but with filtering I believe the dataset won't need you to cast it if the fieldtype is TDateTime as you say.
So try something like
Filtered := false;
Filter := 'DatetimeFiled > ' + QuotedStr(MyDate);
Filtered := true;
* Watch out for issues with date formats, i.e. on some systems 12/01/2000 is December 1st.