Results 1 to 2 of 2
  1. #1
    Join Date
    Jan 2009
    Location
    Ohio, United States
    Posts
    167

    Unanswered: Cannot set criteria on date field due to syntax

    Hello, I am running into an issue where I cannot set criteria on a date field. It seems to recognize the field as a date field in table properties (and I can format it to mm/dd/yy in the query view) but when I set criteria to something like >=#6/30/2011# I get the following error:

    "ODBC--call failed
    [IBM][CLI Driver][DB2/6000]SQL0180N The syntax of the string representation of a datetime value is incorrect. SQLSTATE=22007"

    Does anyone have any ideas how to remedy this? I am able to convert it to a text string and then set criteria on the string but that obviously takes a lot longer to run. Thanks!

    Joshua

  2. #2
    Join Date
    Jan 2009
    Location
    Ohio, United States
    Posts
    167
    Hmm.. I tried changing the criteria to something like >#6/30/2011 7:00:00 PM# and it seems to work very fast. Sorry, is there a way to close a post? Thanks anyway! Josh

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •