Use that condition in your OnFilter event. Month() is a function in 
DateUtils.pas that returns the month of a date. The filter will look something 
like:
 
Accept := Month(Table1DOB.AsDateTime) = DateOfBirth;
 
where DateOfBirth is a variable that you set in code. Is that clear enough for 
you?
 
Dave

--- On Sun, 6/8/08, noexs adi <[EMAIL PROTECTED]> wrote:

From: noexs adi <[EMAIL PROTECTED]>
Subject: RE: [advanced_delphi] Filtering month from table into delphi
To: advanced_delphi@yahoogroups.com
Date: Sunday, June 8, 2008, 10:26 PM











sorry...i still cant understand it.if i about filtering by number,like 6,how 
about when the day is 6 also.can you explain me more detail.
 
sorry for making problem for you
Thanks.


--- On Mon, 9/6/08, Jeremy Grand <[EMAIL PROTECTED] com> wrote:

From: Jeremy Grand <[EMAIL PROTECTED] com>
Subject: RE: [advanced_delphi] Filtering month from table into delphi
To: advanced_delphi@ yahoogroups. com
Date: Monday, 9 June, 2008, 8:53 AM




How about Month(dob)=6?

-----Original Message-----
From: advanced_delphi@ yahoogroups. com on behalf of Nugroho Adi Prasetyo
Sent: Sun 6/8/2008 3:21 PM
To: advanced_delphi@ yahoogroups. com
Subject: [advanced_delphi] Filtering month from table into delphi

Hi all,

To the point,i have a problem with filtering a date especially a month
in one of my table.i give you an example:

i have a table called employee.the field is like this (only simple one)
1.employee_id
2.Name
3.Address
4.Dob(date of birth)--dd/mm/ yyyy

and the data like this
============ ========= ========= ========= ========= ========= ========= ====
Employee_id| Name |Adresss |DOB(dd/mm/yyyy)
============ ========= ========= ========= ========= ========= ========= ====
001 |Andrew |North Jakarta |05/06/1984
002 |Jack |South Jakarta |27/06/1979
003 |Peter |South Jakarta |02/02/1984
============ ========= ========= ========= ========= ========= ========= ====

i wanna show only employee who got a birhday in months 6 (June),in
that table only showed Andrew and Jack.

i wanna implement that filter in Delphi.Just for your information i
used Database Desktop because it's only standalone Software.

Thanks for your response,sorry if my english bad.

Regards,
Nugie ^V^


Send instant messages to your online friends http://uk.messenger .yahoo.com  














      

Reply via email to