8 Replies Latest reply on Jul 12, 2013 9:35 AM by newone8888

    Need help with query between 2 dates



              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'


      <cfoutput query="test">




      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.