I have a SQL statement that searches a date/time field in MS Access which has data such as "12/20/2006 10:02:18 AM". I want to display dates between the current day and one day behind.
This statement keeps giving me 0 records. <cfset month = #dateformat(now(),"mm")#> <cfset year = #dateformat(now(),"yyyy")#> <cfset year2 = #dateformat(now(),"yyyy")#> <cfset month2 = #dateformat(now(),"mm")#> <cfset day = #dateformat(now(),"dd")#> <cfset day2 = DateFormat(Now(),"dd")-1> <CFSET today = Createdate(Year,Month,day)> <CFSET onedaybehind = Createdate(Year2,Month2,day2)> <CFQUERY name="get" datasource="barracuda_log"> SELECT * FROM message_log_20391 where timereceived between #onedaybehind# and #today# I also tried this suggestion: <CFSET today = Createdatetime(Year,Month,day, 23, 59, 59)> <cfset onedaybehind = createDateTime(year2, month2, day2, 0, 0, 0) /> But still 0 records. Any suggestions would be appreciated. Thanks! 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:264581 Subscription: http://www.houseoffusion.com/groups/CF-Talk/subscribe.cfm Unsubscribe: http://www.houseoffusion.com/cf_lists/unsubscribe.cfm?user=89.70.4

