Its all good, This worked Perfectly:

SELECT order_id FROM orders
WHERE order_date BETWEEN CDate('#from_month#' & '/' & '#from_day#' & '/' &
'#from_year#')
AND CDate('#to_month#' & '/' & '#to_day#' &  '/' & '#to_year#')

Thanks for all your help,
Rich

-----Original Message-----
From: Richard Kern [mailto:[EMAIL PROTECTED]]
Sent: Monday, October 09, 2000 11:42 AM
To: CF-Talk
Subject: RE: Between???


Rich,

That's half the answer.  The other half is to use the CreatODBCDate()
function on your form.  Then when it is passed to the action form it will be
posted to the access db is the correct format.  Any existing entries (passed
in without going through this function)  will have to be redone so they are
in the ODBC format before your query will work.  That's a pain to do but I'm
not aware of other solutions for existing entries.

But you might consider that a change in the DB structure to a text field
would then give an opportunity to compare strings and select on them.

Richard

-----Original Message-----
From: HappyToad.com [mailto:[EMAIL PROTECTED]]
Sent: Monday, October 09, 2000 9:01 AM
To: CF-Talk
Subject: RE: Between???


The order_date field in my database is already set to:  Date()
Is this what you mean??

Rich

-----Original Message-----
From: Bob Silverberg [mailto:[EMAIL PROTECTED]]
Sent: Monday, October 09, 2000 10:31 AM
To: CF-Talk
Subject: RE: Between???


The problem is that the format you are using (MM,DD,YYYY) is not valid for
the database.  CF might like that syntax to describe a date, but the SQL
engine won't recognize it.  Check out the CreateODBCDate() function - use it
to convert your date into SQL friendly format.

Bob


-----Original Message-----
From: HappyToad.com [mailto:[EMAIL PROTECTED]]
Sent: Monday, October 09, 2000 10:28 AM
To: CF-Talk
Subject: Between???


I have set up a form to enter the dates which has the following query on the
form action page:

<cfquery name="get_orders" datasource="ibtoad">
SELECT order_id FROM orders
WHERE order_date BETWEEN ('#from_month#','#from_day#','#from_year#')
AND ('#to_month#','#to_day#','#to_year#')
</cfquery>

Why doesn't this work?
Rich


-----Original Message-----
From: John Allred [mailto:[EMAIL PROTECTED]]
Sent: Monday, October 09, 2000 10:10 AM
To: CF-Talk
Subject: Displaying CF code


I have some CF templates on an intranet for which I'd like to display the
code in the user's browser. I find myself without my printed manuals, and I
can't seem to find what I'm looking for in the online help.

Can someone recommend a method I can use to include and transform the code
from a CF template in another template and have it display but not execute?
I fear I'm not making this very clear. What I want to do is have my main
template, that is including a file based on a CFSWITCH on a variable,
either include a file and execute it or pull that same file in and display
the code only by replacing the left brackets with &amp;lt; .

TIA,
--John


----------------------------------------------------------------------------
--
Archives: http://www.mail-archive.com/cf-talk@houseoffusion.com/
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/cf-talk@houseoffusion.com/
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/cf-talk@houseoffusion.com/
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/cf-talk@houseoffusion.com/
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/cf-talk@houseoffusion.com/
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/cf-talk@houseoffusion.com/
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