> My aim is to pick all records out of an access DB, by date range.
> I'm using the following CF:
> <cfquery name="bulletins"
>          datasource="News">
>   SELECT * FROM Articles
>   where approved
>   and startdate > #Now()# and
>   expirydate < #Now()#
> </cfquery>
> Turning on debug on the server shows this ends up as
> SQL = SELECT * FROM Articles where approved and startdate > {ts
> '2001-02-26 15:37:22'} and expirydate < {ts '2001-02-26 15:37:22'}
>
> Unsuprisingly, this returns no results (there is at least one
> record in the
> intended range). Is my SQL off, or do I need to use a particular type of
> date in access ?

How can something start after today and end before today? You got a time
machine?

Try using >= and <= or swap your > and < around

Philip Arnold
Director
Certified ColdFusion Developer
ASP Multimedia Limited
T: +44 (0)20 8680 1133

"Websites for the real world"

**********************************************************************
This email and any files transmitted with it are confidential and
intended solely for the use of the individual or entity to whom they
are addressed. If you have received this email in error please notify
the system manager.
**********************************************************************



~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
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