Board index » delphi » how to filter date in TTable

how to filter date in TTable

i am using MSAccess with Odbc and BDE alieas , how to date filter in TTable.
pls refer my code
decodeDate(DateTimePicker1.Date, Year, Month, Day);
      str := '#'+IntToStr(Day)+'/'+IntToStr(month)+'/'+IntToStr(Year)+'#';
i tryed with out  this '#'

MASTER.Filter  := CURRENT_DATE >= ' +str ;

pls help me


Re:how to filter date in TTable

1/ you can use appropriate and more convenient functions to get the date in
a string.
look at formatdatetime and similar functions.

2/ defining the filter is not sufficient.
have you set the filtered property to True ?
MASTER.filter := ...
MASTER.filtered := True;


Other Threads