I need to get today's orders in a query. I know there's one test order in the db today, but I can't get my query to return anything. It's SQL Server, smalldatetime field. Here's the data in the db: 8/13/2006 6:04:00 PM
What do I do to make this work? <cffunction name="getTodayOrders" access="public" returntype="query" output="false" hint="Returns a query of today's orders"> <cfset var gettodayorders = ""> <cfquery name="gettodayorders" datasource="#VARIABLES.dsn#"> SELECT orderID, orderdate, ordersubtotal, ordertotal, cartID, paymentstatusID, paypalpaymenttypeID, shiptotal FROM tblOrders WHERE orderdate = <cfqueryparam cfsqltype="cf_sql_timestamp" value="#CreateODBCDateTime(Now())#"> ORDER BY orderdate DESC </cfquery> <cfreturn gettodayorders> </cffunction> Thanks, Will ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~| Introducing the Fusion Authority Quarterly Update. 80 pages of hard-hitting, up-to-date ColdFusion information by your peers, delivered to your door four times a year. http://www.fusionauthority.com/quarterly Archive: http://www.houseoffusion.com/groups/CF-Talk/message.cfm/messageid:250522 Subscription: http://www.houseoffusion.com/groups/CF-Talk/subscribe.cfm Unsubscribe: http://www.houseoffusion.com/cf_lists/unsubscribe.cfm?user=11502.10531.4