Although this will work perfectly, if provided with CF variables.
However, I think Will's dates were already in the database where he
would need to stick to the database's date functions.

In other words, he wasn't in a situation where he was passing in CF
variables to his SQL statement.

Mike

-----Original Message-----
From: John M Bliss [mailto:[EMAIL PROTECTED] 
Sent: Monday, December 01, 2008 9:23 AM
To: cf-talk
Subject: Re: SQL between dates problem

Another CFMLish option:

couponstartdate <= #CreateODBCDateTime(CreateDateTime(DatePart("yyyy",
Now()), DatePart("m", Now()), DatePart("d", Now()), 23, 59, 59))# and
couponenddate >= #CreateODBCDateTime(CreateDateTime(DatePart("yyyy",
Now()), DatePart("m", Now()), DatePart("d", Now()), 0, 0, 1))#

~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~|
Adobe® ColdFusion® 8 software 8 is the most important and dramatic release to 
date
Get the Free Trial
http://ad.doubleclick.net/clk;207172674;29440083;f

Archive: 
http://www.houseoffusion.com/groups/cf-talk/message.cfm/messageid:316069
Subscription: http://www.houseoffusion.com/groups/cf-talk/subscribe.cfm
Unsubscribe: http://www.houseoffusion.com/cf_lists/unsubscribe.cfm?user=89.70.4

Reply via email to