One of:

Note, you can use <, >, <=, >=, <>, = 

EXCEPT they usually apply to both the date AND THE TIME. Remember that.

(use a query)
select * from yourtable where datefield < '28-02-1999'
or
select * from yourtable where datefield < :theDateField

query.params.parambyName('theDateField').AsDateTime := now; (or whatever
TDateTime you have)

(gotta find the format of the date for your 'system'.

via a table (not good in SQL databases - not so bad in Paradox etc)

table.Filter := 'datefield < ''28-02-1999'' '
table.filtered := true;

etc.


HTH

N

Matthew Comb wrote:
> 
> Ok, I'm embarressed to even be asking this but as databasing is not my top
> function Ill let one of you gurus tell me how to do it.
> 
> How do you filter a table on a date field?
> 
> Cheers,
> 
> Matt.
> 
> ---------------------------------------------------------------------------
>     New Zealand Delphi Users group - Delphi List - [EMAIL PROTECTED]
>                   Website: http://www.delphi.org.nz

--
Nic Wise - Inprise New Zealand / Brocker Technologies Web Monkey.
mob:+64.21.676.418 - wk:+64.9.481.9999 x9753 - wk-em:[EMAIL PROTECTED]
hm: +64.9.277.5309 - hm-em:[EMAIL PROTECTED]
---------------------------------------------------------------------------
    New Zealand Delphi Users group - Delphi List - [EMAIL PROTECTED]
                  Website: http://www.delphi.org.nz

Reply via email to