You may want to consider using CreateODBCDateTime(Now()). When you use CreateODBCDate(Now()), the time portion is returned as 00:00:00, and if you have stored data for a future date with a time specified (i.e., 09:38:22), then you may not get a match as that datetime will be beyond the maximum parameter. This may come into play if your solution to getting datetime objects somehow uses Now(), and gives a full datetime object to match against.
Hope this is helpful, James Edmunds New Iberia, LA On Thu, 28 Oct 2004 11:15:20 -0400, Les Mizzell <[EMAIL PROTECTED]> wrote: > I don't know why I have so much trouble with this.. > > OK, I need to get all records with a depart date starting today and for > the next 15 days... > > So, first set the variables... > > <cfset TodayDate = #CREATEODBCDATE(now())#> > <cfset FutureDate = #CREATEODBCDATE(now() + form.departdate)#> > <!--- form.departdate is a simple number showing number of days in the > future - 15, 30, 45. ---> > > ...and then it seems this should work in the query: > > WHERE DEPART_DATE >= #TodayDate# and DEPART_DATE <= #FutureDate# > > But, it isn't working. > > Problem 1: This database was handed to me to work with. It's mySQL. > "DEPART_DATE" is a varText field and all the dates in it are listed as > "8/15/2004". This is probably causing all my headaches. > > Simply switching the data type in the database doesn't work - the data > gets translated incorrectly. > > So, advise on how to best correct this problem and get the query to work > correctly? > > I'm only an idiot half the time... > > -- > Les Mizzell > > ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~| Purchase from House of Fusion, a Macromedia Authorized Affiliate and support the CF community. http://www.houseoffusion.com/banners/view.cfm?bannerid=35 Message: http://www.houseoffusion.com/lists.cfm/link=i:4:182938 Archives: http://www.houseoffusion.com/cf_lists/threads.cfm/4 Subscription: http://www.houseoffusion.com/lists.cfm/link=s:4 Unsubscribe: http://www.houseoffusion.com/cf_lists/unsubscribe.cfm?user=11502.10531.4 Donations & Support: http://www.houseoffusion.com/tiny.cfm/54

