well, if you pick all the dates that have a date greater than today AND less
than today, you'll get nothing. :)

i think you need to rethink your date range. :)

chris olive, cio
cresco technologies
[EMAIL PROTECTED]
http://www.crescotech.com



-----Original Message-----
From: Thomas Chiverton [mailto:[EMAIL PROTECTED]]
Sent: Monday, February 26, 2001 10:45 AM
To: CF-Talk
Subject: Selecting a date range, access DB


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 ?

Regards,

Thomas Chiverton,
Intranet Webmaster and Desktop Analyst
Office: 01565 757 909
As a GUI, reality in useless...
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
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