also, use cfqueryparam in your query =)

Charlie Griefer wrote:
> you could keep it in... just set it to 11:59 pm on the "oneday" variable.
> 
> <cfset today = createDate(year, month, day) />
> <cfset oneday = createDateTime(year2, month2, day2, 23, 59, 59) />
> 
> (btw, if "year", "month", and "day" are your CF variable names...i'd
> rename those.  those are built in functions in CF and using them as
> variable names is just asking for trouble) :)
> 
> On 12/19/06, Orlini, Robert <[EMAIL PROTECTED]> wrote:
> 
>>I have a search form that searches an Access table w/a date/time field. It 
>>includes date and time (12/19/2006 8:20:07 AM) and I think the time maybe 
>>affecting the search.
>>
>>When I pass a search into:
>>
>><CFSET today = Createdate(Year,Month,day)>
>><CFSET oneday = Createdate(Year2,Month2,day2)>
>>
>><CFQUERY name="get" datasource="barracuda_log">
>>SELECT * FROM message_log_20391
>>where timereceived between #today# and #oneday#
>>
>>The result is:
>>SELECT * FROM message_log_20391
>>where timereceived between {ts '2006-12-18 00:00:00'} and {ts '2006-12-31 
>>00:00:00'}
>>
>>When I ask for 12-18-2006 to 12-18-2006, I don't get the desired result. It 
>>displays: {ts '2006-12-18 00:00:00'} and {ts '2006-12-18 00:00:00'} in the 
>>statement, but gives a new records found message.
>>
>>How can I get rid of the 00:00:00'?
>>
>>Thanks as always.
>>
>>Robert O.
>>HWW
>>
>>
>>
>>
>>
>>
>>
> 
> 
> 

~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~|
Create robust enterprise, web RIAs.
Upgrade & integrate Adobe Coldfusion MX7 with Flex 2
http://ad.doubleclick.net/clk;56760587;14748456;a?http://www.adobe.com/products/coldfusion/flex2/?sdid=LVNU

Archive: 
http://www.houseoffusion.com/groups/CF-Talk/message.cfm/messageid:264489
Subscription: http://www.houseoffusion.com/groups/CF-Talk/subscribe.cfm
Unsubscribe: 
http://www.houseoffusion.com/cf_lists/unsubscribe.cfm?user=11502.10531.4

Reply via email to