Ah ok,
forgot to mention the time stamp I'm checking against won't have  
times, i.e 00:00:00 etc.

So I need to do two things:

One, get past events, two get forthcoming events:

Past events has to get everything "yesterday" (by date) backwards,  
and forthcoming has to include today forwards:

So for each of them, I just can't the syntax right to literally add  
or remove a day?


T



On 23 May 2007, at 13:28, Kris Jones wrote:

> This is one way of doing it. But watch out. Got bit by some old code
> that used this approach on the switch to daylight savings time. It's
> better to add a day, then subtract a second.
>
>> If you want to check until midnight today:
>>
>> SELECT * from request.events WHERE EventDate <
>> #createDateTime(Year(Now()),Month(Now()),Day(Now()),11,59,59)#
>>
>> Also, you might want to use <cfqueryparam> to pass in the value to  
>> SQL.
>>
>
> 

~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~|
Create robust enterprise, web RIAs.
Upgrade & integrate Adobe Coldfusion MX7 with Flex 2
http://www.adobe.com/products/coldfusion/flex2/?sdid=RVJP

Archive: 
http://www.houseoffusion.com/groups/CF-Talk/message.cfm/messageid:278967
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