Sorry, although we do have SQL server it is an Access database that the
Support KB is stored in.
-----Original Message-----
From: Michael Lugassy [mailto:[EMAIL PROTECTED]]
Sent: 21 May 2001 13:20
To: CF-Talk
Subject: Re: Querying by a date field.
That's weird, what DB are u using? that's working for me on SQL 7/2000
note that Date_Entered must be the colum name, right?
Anyhow, you can probarbly use this also:
<DATES ARE A MAJOR BAMMER>
<cfset ddifer = DateDiff("d", CreateDATE(date), now())>
<cfquery name="getdate" datasource="suppkb" dbtype="ODBC">
SELECT *
FROM Main_Table
WHERE Date_Entered BETWEEN getdate(-#ddifer#) and getdate()
</cfquery>
</DATES ARE A MAJOR BAMMER>
That will insert into ddifer the number of days diffrentiation between NOW()
and what people
chose in your form and run a query based on : [today-#ddfier# days] and
today]
you will need to complete the CreateDate(date) function yourself...
But there probarbly other ways, better... sorry.
Thanks,
Michael Lugassy
IT/WEB Specialist
Interactive Music Ltd.
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
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