Quantcast
Channel: Adobe Community: Message List - ColdFusion
Viewing all articles
Browse latest Browse all 21760

Need help with query between 2 dates

$
0
0

Hi,

        I have not used CF in long time and need help with a simple query.

I have an access DB table with 3 fields, name, date and number

What I want to is to create a query to pull all names between 2 dates

When I query the date field, the results are showing in this formate 2013-07-12 00:00:00

 

Here is my query

 

<cfquery datasource="mydb" name="test">

Select name from mytable

where edate Between '2011-01-01 00:00:00' AND '2013-01-01 00:00:00'

</cfquery>

<cfoutput query="test">

#name#

</cfoutput>

 

What I get is this error

ODBC Error Code = 22005 (Error in assignment)

 

[Microsoft][ODBC Microsoft Access Driver] Data type mismatch in criteria expression.

 

Not sure what I'm doing wrong here.

Please let me know.

Thanks


Viewing all articles
Browse latest Browse all 21760

Trending Articles



<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>