I'm trying to use TO_DATE to query an Oracle SDE dataset. It's not working in the javascript API application so I tried to query the rest end point directly and I get the error:

"Unable to perform query" on a java version of ArcGIS Server I also get the error "Please check your parameters"

Here is the ESRI topic at 10 which shows how to_date should be used http://help.arcgis.com/en/arcgisdesktop/10.0/help/index.html#//00s500000033000000.htm

The format:

Datefield = TO_DATE('yyyy-mm-dd hh:mm:ss','YYYY-MM-DD HH24:MI:SS')

My Query:

DateTest = TO_DATE('2012-01-01 00:00:00', 'YYYY-MM-DD HH24:MI:SS')

I have also tried not including the time and using / instead of -

Oracle version is 10g. ArcGIS server is version 10 (.net and java tried)

  • Have you tried running the sql in a sqlplus window? i.e. select to_char(TO_DATE('2012-01-01 00:00:00', 'YYYY-MM-DD HH24:MI:SS')) from dual; Does it return an error? It maybe something with your locale?
    – mapoholic
    Commented Jul 26, 2012 at 14:59

1 Answer 1


I was having the same issue and recycling the application pool followed by a cache clear of the 10.0 rest fixed the problem. I believe I have to figure out how to configure my application pool better so these errors don't happen. That was the quick fix anyway.

Let me know if that helps :)

  • I'm off the project now but thanks for the suggestion. I will be sure to try it next time. Commented Aug 8, 2013 at 9:07
  • @DavidWilton Even though you are off the project now I think you should reward user1567453 by Accept-ing his/her Answer. If when "next time" comes up you find it does not work then you can always un-Accept or move your Accept to another Answer.
    – PolyGeo
    Commented May 19, 2014 at 23:48
  • I can't accept an answer I don't know is correct. Nobody else has upvoted the answer and nobody else has commented to say it worked. I haven't presently got a version of Java ArcGIS server I can test on Commented May 20, 2014 at 2:57

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Not the answer you're looking for? Browse other questions tagged or ask your own question.