You have to factor in the time as well, which makes this a range search and not an exact match.
The start of a day is 00:00:00, the end of the day is 23:59:59 startDateTime = CreateDateTime(startYear, startMonth, startDay, 0, 0, 0) endDateTime = CreateDateTime(endYear, endMonth, endDay, 23,59,59) SELECT * FROM myTable WHERE aDateTimeCol >= <cfqueryparam value="#startDateTime#" cfsqltype="cf_sql_timestamp"> AND aDateTimeCol <= <cfqueryparam value="#endDateTime#" cfsqltype="cf_sql_timestamp"> > Hi there > > I have in a MySQL Database a field called anniversarydate. > > The field is actually a datetime field. > > In the program I want to select all records between certain dates but > I am struggling to do it - am wondering what the secret is. Basically > I have in the field: > > 2008-01-25 15:08:12 I'm guessing that I somehow have to ignore the > time part of the field. > > Regards > > > Thanks in advance ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~| Adobe® ColdFusion® 8 software 8 is the most important and dramatic release to date Get the Free Trial http://ad.doubleclick.net/clk;160198600;22374440;w Archive: http://www.houseoffusion.com/groups/CF-Talk/message.cfm/messageid:298431 Subscription: http://www.houseoffusion.com/groups/CF-Talk/subscribe.cfm Unsubscribe: http://www.houseoffusion.com/cf_lists/unsubscribe.cfm?user=89.70.4

