I know that Sybase stores date fields as yyyy-mm-dd.  If whatever database
you are using does the same, then checking for mm,dd,yyyy isn't going to
work, for example.

Todd Ashworth

----- Original Message -----
From: "HappyToad.com" <[EMAIL PROTECTED]>
To: "CF-Talk" <[EMAIL PROTECTED]>
Sent: Monday, October 09, 2000 11:00 AM
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


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

Reply via email to