>
> try using single quote's:
>
> WHERE creationdate >= '#dateA#' and creationdate <= '#dateB#'
>
[snip]
>
> 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.
[snip]
If its an access datasource and you're using ODBC to connected to it then
you need to make sure the dates are in a true ODBC date format and not just
"26/07/2000". Make sure you're using the CreateODBCDate() function on your
dates and you should be able to just do this :
WHERE creationdate >= #CreateODBCDate(dateA)# and creationdate <=
#CreateODBCDate(dateB)#
Oh - depending on where you are and how you have the database set up you may
also need to look in to the Locale functions.
Access/ODBC doesn't do textual comparisons of dates. So Johan's suggestion
above won't work I'm afraid.
Regards
Stephen
------------------------------------------------------------------------------
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.