By default Now() returns time down to the second, you might want to try
createODBCDate(Now()) or DateFormat(Now(), "mm/dd/yy").

HTH,

Michael Caulfield

-----Original Message-----
From: Johnny Boursiquot [mailto:[EMAIL PROTECTED]]
Sent: Saturday, April 07, 2001 1:31 AM
To: CF-Talk
Subject: Problem generating a query based on a specific date field


I have an Access 2000 db that has a Clock table which has a ClockDate colum.
I tried generating results from that table using the following code:

<CFQUERY datasource="#DSN#" name="clock">
        SELECT * FROM Clock  WHERE (StaffID = #session.StaffID#) AND (ClockDate =
Now())
</CFQUERY>

No results were returned. I verified the table and made sure I had the
content
with the appropriate requirements (a staffid and date for today) yet nothing
came back.

I went into Access, built a query that had #4/6/01# as a criteria for the
colum
ClockDate and actually got results back. Now I obviously cannot use #s in my
cfml.

Does anyone know how I overcome this?
Thanks in advance


Johnny Boursiquot
iDjin Web Works, Inc.
www.idjin.com
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
Structure your ColdFusion code with Fusebox. Get the official book at 
http://www.fusionauthority.com/bkinfo.cfm

Archives: http://www.mail-archive.com/cf-talk@houseoffusion.com/
Unsubscribe: http://www.houseoffusion.com/index.cfm?sidebar=lists

Reply via email to