On 12/14/01, Tyler Silcox penned:
>Can someone recommend a good SQL (MS-SQL preferred) list?  I'm trying to get
>a date query working, and it's not quite living up to it's part of the
>bargain.  The following is what I'm using, if anyone here has a quick
>resolution, please email me off-list ([EMAIL PROTECTED]) thanks->
>
><!--- i get all the emails older than 30 days that you have already
>read --->
><cfquery name="getOldEmail" datasource="#request.datasource#">
>     SELECT pop_store_id
>     FROM pop_store
>     WHERE date_created < #CreateODBCDateTime(CreateTimeSpan(-30, 0, 0, 0) +
>Now())#
>         AND unread = 0
></cfquery>

Try using this:

#CreateODBCDate(DateAdd('D', -30, now()))#
-- 

Bud Schneehagen - Tropical Web Creations

_/_/_/_/_/_/_/_/_/_/_/_/_/_/_/_/_/_/_/
ColdFusion Solutions / eCommerce Development
[EMAIL PROTECTED]
http://www.twcreations.com/
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
Structure your ColdFusion code with Fusebox. Get the official book at 
http://www.fusionauthority.com/bkinfo.cfm
FAQ: http://www.thenetprofits.co.uk/coldfusion/faq
Archives: http://www.mail-archive.com/[email protected]/
Unsubscribe: http://www.houseoffusion.com/index.cfm?sidebar=lists

Reply via email to