> SELECT * FROM myTable
> WHERE ((DateDiff('yyyy',DOBfield,DATE())
> BETWEEN 30 AND 40))
clancy, try this:
where year(date()) - year(DOBfield)
- iif(month(date()) > month(DOBfield),0,
iif(month(date()) < month(DOBfield),1,
iif(day(date()) < day(DOBfield),1,0)))
between 30 and 40
this is accurate, including right on the person's birthday
rudy
____ • The WDVL Discussion List from WDVL.COM • ____
To Join wdvltalk, Send An Email To: mailto:[EMAIL PROTECTED]
Send Your Posts To: [EMAIL PROTECTED]
To set a personal password send an email to [EMAIL PROTECTED] with the words: "set
WDVLTALK pw=yourpassword" in the body of the email.
To change subscription settings to the wdvltalk digest version:
http://wdvl.internet.com/WDVL/Forum/#sub
________________ http://www.wdvl.com _______________________
You are currently subscribed to wdvltalk as: [EMAIL PROTECTED]
To unsubscribe send a blank email to [EMAIL PROTECTED]