[SOLVED] Tdbf: Filtering by date lazarus / 16-Databases ---------------------------------------------------------------------- arwen · 2007-07-27 15:07 I have create a table in level 4 where I put a field of type 'ftDate'. How filter by date ? Thanks to all ---------------------------------------------------------------------- wile64 · 2007-07-27 16:04 Create a index : AddIndex('DateID', 'Date', []);* and select index : IndexName:='DateID'; ---------------------------------------------------------------------- arwen · 2007-07-27 16:15 Quote from: "wile64"Create a index : AddIndex('DateID', 'Date', []);* and select index : IndexName:='DateID'; I want filter the data and not order so I need to use the Dbf1.filter and then put to true the Dbf1.filtered . I can do it with all kind of data but I don't know how to do it with ftDate . Thank to all ---------------------------------------------------------------------- arwen · 2007-08-02 10:01 SOLVED   For filtering record by date : Code: [Select] Dbf1.Filter:= ('DTOS(FieldName)'+ '=' + '"' + '20070101' + '"'); the date is in format YYYYMMDD Thanks to all