DateFormat() is not a function in MSAccess. Format() is the function you
want, and the single quotes aren't necessary:
SELECT
a.[ID], a.[EMAIL], a.FIRSTNAME
, a.DATE_PURCHASED, a.DATE_REMIND
FROM
CUSTOMERS As a
WHERE
Format(a.DATE_REMIND, "M/DD/YYYY") = Format(Now(), "M/DD/YYYY")
David L. Penton, MCP
"Mathematics is music for the mind, and Music is Mathematics for the
Soul." - J.S. Bach
[EMAIL PROTECTED]
"Remember - I can only show you the door. You have to walk through it."
-----Original Message-----
From: Brett Smith
Below is a query I need some help on. All I am trying to do is select the
customers from the database that have a remind date of today. I am having
problems with my WHERE statement. The query is not returing any records but
there are records that have the Date_Remind of today. Can anyone help?
The Date_Remind field is a short date in an Access database.
<CFQUERY NAME="GetCustomers" DATASOURCE="#DATASOURCE#">
SELECT ID, EMAIL, FIRSTNAME, DATE_PURCHASED, DATE_REMIND
FROM CUSTOMERS
WHERE (('DateFormat(Date_Remind, "M/DD/YYYY")') = ('DateFormat(Now(),
"M/DD/YYYY")'))
</CFQUERY>
<CFOUTPUT QUERY="GetCustomers">
Date Remind: #DateFormat(Date_Remind, "M/DD/YYYY")#<BR>
Now: #DateFormat(Now(), "M/DD/YYYY")#<BR>
Email: #Email#<BR>
<P></CFOUTPUT>
-------------------------------------------------------------------------
This email server is running an evaluation copy of the MailShield anti-
spam software. Please contact your email administrator if you have any
questions about this message. MailShield product info: www.mailshield.com
-----------------------------------------------
To post, send email to [EMAIL PROTECTED]
To subscribe / unsubscribe: http://www.dfwcfug.org