You should use:

WHERE creationdate >= #CreateODBCDate(dateA)# AND creationdate <=
#CreateODBCDate(dateB)#. You should never use dates directly (in a WHERE
clause or any other part of a SQL statement) without using one of
CreateODBCDate() CreateODBCTime() or CreateODBCDateTime(). That's the only
safe way to use dates consistently.

Also, you can use the BETWEEN clause.

--- Ben



-----Original Message-----
From: Johan Coens [mailto:[EMAIL PROTECTED]]
Sent: Wednesday, July 26, 2000 8:41 AM
To: [EMAIL PROTECTED]
Subject: RE: DATES!!!!!!!!!`


try using single quote's:

WHERE creationdate >= '#dateA#' and creationdate <= '#dateB#'

Regards,
Johan

-----Original Message-----
From: Bud [mailto:[EMAIL PROTECTED]]
Sent: woensdag 26 juli 2000 14:20
To: [EMAIL PROTECTED]
Subject: Re: DATES!!!!!!!!!`


On 7/26/00, Jason Glaun penned:
>I have a problem with getting records out of an access database that have
>creation dates between dateA and dateB.   I just cant get the query to
work!
>Anyone got any suggestions????

WHERE creationdate >= #dateA# and creationdate <= #dateB#

Always works for me.

As a side note. I have had problems in the past if I name a field
with an underscore in front of date. Like creation_date. I always
name them creationdate without the underscore.
--

Bud Schneehagen - Tropical Web Creations

_/_/_/_/_/_/_/_/_/_/_/_/_/_/_/_/_/_/_/
ColdFusion Solutions / eCommerce Development
[EMAIL PROTECTED]
http://www.twcreations.com/
954.721.3452
----------------------------------------------------------------------------
--
Archives: http://www.mail-archive.com/[email protected]/
To Unsubscribe visit
http://www.houseoffusion.com/index.cfm?sidebar=lists&body=lists/cf_talk or
send a message to [EMAIL PROTECTED] with 'unsubscribe' in
the body.

----------------------------------------------------------------------------
--
Archives: http://www.mail-archive.com/[email protected]/
To Unsubscribe visit
http://www.houseoffusion.com/index.cfm?sidebar=lists&body=lists/cf_talk or
send a message to [EMAIL PROTECTED] with 'unsubscribe' in
the body.

------------------------------------------------------------------------------
Archives: http://www.mail-archive.com/[email protected]/
To Unsubscribe visit 
http://www.houseoffusion.com/index.cfm?sidebar=lists&body=lists/cf_talk or send a 
message to [EMAIL PROTECTED] with 'unsubscribe' in the body.

Reply via email to