try this:

SELECT tsessiontracking.siteID, 
tsessiontracking.userid, tsessiontracking.entered 
FROM tsessiontracking 
WHERE DATE(tsessiontracking.entered) =  <cfqueryparam cfsqltype="cf_sql_date" 
value="#createodbcdate(createdate(2008,10,1))#">

DATE() is a mysql functions that returns just the date part of a 
datetime/timestamp field.


Azadi Saryev
Sabai-dee.com
http://www.sabai-dee.com/



Toby King wrote:
> Hi there 
>
> I am trying to do a query of a table in a database using a date field and I 
> am getting no records returned. 
>
> The date field in the database (MySQL database) is set as a datetime field. 
>
> So I am guessing that querying just using the date '2008-10-01' is not 
> correct. 
>
> My query is this 
>
>
> SELECT tsessiontracking.siteID, 
> tsessiontracking.userid, tsessiontracking.entered 
> FROM tsessiontracking 
> WHERE tsessiontracking.entered =  '2008-10-01'
>
> Any help would really be appreciated 
>   

~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~|
Adobe® ColdFusion® 8 software 8 is the most important and dramatic release to 
date
Get the Free Trial
http://ad.doubleclick.net/clk;207172674;29440083;f

Archive: 
http://www.houseoffusion.com/groups/cf-talk/message.cfm/messageid:313313
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