Well, if this is MS SQL, then it should be:

WHERE date BETWEEN #createodbcdate(Now())# AND dateadd(d, 6,
#createodbcdate(Now())#)

or

WHERE date BETWEEN #createodbcdate(Now())# AND #dateadd("d", 6,
createodbcdate(Now()))#

The first one does the add in SQL, the second does the add in CF.  The
second should work even if it isn't MSSQL.

Steve


-----Original Message-----
From: Cutter (CF-Talk) [mailto:[EMAIL PROTECTED]
Sent: Wednesday, July 09, 2003 8:17 AM
To: CF-Talk
Subject: SOT: SQL and Dates


What is the proper SQL statement for something like...


WHERE Date BETWEEN #createodbcdate(Now())# AND (#createodbcdate(Now())# + 6)

I know that's not right (because it doesn't work). Any ideas? Just 
trying to pull today's date and the rest of this week's dates.

Cutter


~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~|
Archives: http://www.houseoffusion.com/cf_lists/index.cfm?forumid=4
Subscription: 
http://www.houseoffusion.com/cf_lists/index.cfm?method=subscribe&forumid=4
FAQ: http://www.thenetprofits.co.uk/coldfusion/faq

Get the mailserver that powers this list at 
http://www.coolfusion.com

                                Unsubscribe: 
http://www.houseoffusion.com/cf_lists/unsubscribe.cfm?user=89.70.4
                                

Reply via email to