----- Original Message -----
From: "Brian Simpson" <[EMAIL PROTECTED]>
--snip--
<CFQUERY NAME="GetProfiles" DATASOURCE="#datasource#">
SELECT ItemId, ImageA, FirstName, DOB
FROM  Profiles
WHERE DOB < '#dateformat(Startage, "mm/dd/yyyy")#'
</CFQUERY>
--snip--
----------------------------

This filter should return all records where DOB is over 20 years ago:

WHERE DOB < #CreateODBCDate(DateAdd("yyyy", -20, Now ()))#

Always use the CreateODBCDate function when adding to or comparing with
database date/time fields. That's assuming you're using a date/time
field and an ODBC database of course!

HTH,

- Gyrus

~~~~~~~~~~~~~~~~~~~~~~~~~~~~
- [EMAIL PROTECTED]
work: http://www.tengai.co.uk
play: http://www.norlonto.net
- PGP key available
~~~~~~~~~~~~~~~~~~~~~~~~~~~~

______________________________________________________________________
Your ad could be here. Monies from ads go to support these lists and provide more 
resources for the community. http://www.fusionauthority.com/ads.cfm
FAQ: http://www.thenetprofits.co.uk/coldfusion/faq
Archives: http://www.mail-archive.com/cf-talk@houseoffusion.com/
Unsubscribe: http://www.houseoffusion.com/index.cfm?sidebar=lists

Reply via email to