Glad I could help. :)

> Great! That works.

> Thank you,

> James

> -----Original Message-----
> From: S. Isaac Dealey [mailto:[EMAIL PROTECTED]
> Sent: Sunday, September 21, 2003 2:06 PM
> To: CF-Talk
> Subject: Re: Query help - Selecting record based on date


> Assuming SQL Server or Oracle:

> SELECT * FROM MyTable WHERE mydatetimecolumn BETWEEN
> <cfqueryparam
> value="#date1#" cfsqltype="cf_sql_timestamp"> and
> <cfqueryparam
> value="#date2#" cfsqltype="cf_sql_timestamp">

> You may need to use cf_sql_datetime for oracle -- I know
> mssql server doesn't understand date or datetime, only
> timestamp... blech...
> but in any event, that should get you on your way. :)


> s. isaac dealey                972-490-6624

> team macromedia volunteer
> http://www.macromedia.com/go/team

> chief architect, tapestry cms  http://products.turnkey.to

> onTap is open source           http://www.turnkey.to/ontap

>> Hi,

>> I'm building an app that needs to retrieve records from a
>> SQL Server table
>> based on a record's date.

>> The date values in the table are in the format of m/d/y
>> h:m:s AM/PM
>> (8/4/2003 1:02:16 PM).

>> The tool I'm building allows the user to input a date
>> range in the format of
>> 08/04/2003 to 08/30/2003.

>> So, for instance a record has the date value of 8/4/2003
>> 1:02:16 PM. I
>> want to pass in 08/01/2003 (date1) and 08/15/2003 (date2)
>> and
>> find that record.

>> I've tried converting the date with ParseDateTime(),
>> which didn't work
>> and trying LIKE '%#date1#%' which didn't work either.

>> Suggestions? The data in the table can't be changed, as
>> it was
>> generated by a tool already in production.

>> Thanks,
>> James

>> ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
>> ~
>> ~~~~~~~~~~~|
>> Message:
>> http://www.houseoffusion.com/lists.cfm?link=i:4:137806
>> Archives: http://www.houseoffusion.com/lists.cfm?link=t:4
>> Subscription:
>> http://www.houseoffusion.com/lists.cfm?link=s:4
>> Unsubscribe:
>> http://www.houseoffusion.com/cf_lists/unsubsc
>> ribe.cfm?user=633.558.4

>> Your ad could be here. Monies from ads go to support
>> these lists and
>> provide more resources for the community.
>> http://www.fusionauthority.com/ads.cfm




> ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
> ~~~~~~~~~~~|
> Message:
> http://www.houseoffusion.com/lists.cfm?link=i:4:137812
> Archives: http://www.houseoffusion.com/lists.cfm?link=t:4
> Subscription:
> http://www.houseoffusion.com/lists.cfm?link=s:4
> Unsubscribe: http://www.houseoffusion.com/cf_lists/unsubsc
> ribe.cfm?user=633.558.4

> This list and all House of Fusion resources hosted by
> CFHosting.com. The place for dependable ColdFusion
> Hosting.
> http://www.cfhosting.com



s. isaac dealey                972-490-6624

team macromedia volunteer
http://www.macromedia.com/go/team

chief architect, tapestry cms  http://products.turnkey.to

onTap is open source           http://www.turnkey.to/ontap


~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~|
Message: http://www.houseoffusion.com/lists.cfm?link=i:4:137813
Archives: http://www.houseoffusion.com/lists.cfm?link=t:4
Subscription: http://www.houseoffusion.com/lists.cfm?link=s:4
Unsubscribe: http://www.houseoffusion.com/cf_lists/unsubscribe.cfm?user=89.70.4

Signup for the Fusion Authority news alert and keep up with the latest news in 
ColdFusion and related topics. 
http://www.fusionauthority.com/signup.cfm

Reply via email to