The correct solution to this problem is...

In MSSQL Server when you want all of the orders from today:


<cfset variables.Today = CreateDate(year(NOW()),  month(NOW()),
day(NOW()))>
<cfquery>
SELECT *
FROM ORDERS
WHERE OrderDate BETWEEN
<cfqueryparam cfsqltype="cf_sql_timestamp" value="#CreateODBCDateTime(
variables.Today 00:00:01)#">
           AND
<cfqueryparam cfsqltype="cf_sql_timestamp" value="#CreateODBCDateTime(
variables.Today 23:59:59)#">
</cfquery>


HTH

-- 
Alan Rother
Macromedia Certified Advanced ColdFusion MX 7 Developer


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