Date is probably a date/time function.  So your definition of 'today' needs
to be a little more exact.  My point being, you probably have the date
(4/9/2001) stored as:  04/09/2001 00:00:00.000 and when you do the now()
function Access is seeing that as 04/09/2001 15:30:29.001 which is actually
later then the date you have stored.  This will always be something to look
for with datetime fields.  I work mostly with SQL, not Access, so this may
or not be the case for you.

-----Original Message-----
From: [EMAIL PROTECTED] [mailto:[EMAIL PROTECTED]]
Sent: Monday, April 09, 2001 2:53 PM
To: CF-Talk
Subject: QUERY PROBLEM


I am trying to pull the next baseball game from a schedule I have in an
Access database. When it processes it pulls the next game to a degree. If
there is a game today it will not pull that game. Example there is a game
today 4/9/2001 and the ext game it displays is 4/10/2001  Any ideas?

<cfset today = dateformat(NOW(), 'm/d/yyyy')>

<CFQUERY name="NextGame" datasource="#dsource#" maxrows="1">
    SELECT *
    FROM schedule
    WHERE gdate >= #today#
</CFQUERY>

ALSO HAD IT AS

<CFQUERY name="NextGame" datasource="#dsource#" maxrows="1">
    SELECT *
    FROM schedule
    WHERE gdate >= NOW()
</CFQUERY>


Thanks.

Brian Hasselback
[EMAIL PROTECTED]
http://www.intent.net
http://www.hasselback.com
Web Hosting & Development
(502) 452-1851
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
Structure your ColdFusion code with Fusebox. Get the official book at 
http://www.fusionauthority.com/bkinfo.cfm

Archives: http://www.mail-archive.com/[email protected]/
Unsubscribe: http://www.houseoffusion.com/index.cfm?sidebar=lists

Reply via email to