I would do something like:

WHERE datetime BETWEEN CAST(FLOOR(CAST(couponstartdate AS float)) AS
datetime)
AND CAST(FLOOR(CAST(couponenddate AS float)) AS datetime)

-----Original Message-----
From: Will Tomlinson [mailto:[EMAIL PROTECTED] 
Sent: Monday, December 01, 2008 9:05 AM
To: cf-talk
Subject: Re: SQL between dates problem

>If you are using MS SQL...
>
>SELECT CAST(FLOOR(CAST(GETDATE() AS float)) AS datetime)
>
>This will remove any time part from a datetime field.
>

So then I write it like this?

AND datetime >= couponstartdate and datetime <= couponenddate 

Thanks!

Will

~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~|
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:316065
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