Geographic Information Systems Stack Exchange is a question and answer site for cartographers, geographers and GIS professionals. Join them; it only takes a minute:

Sign up
Here's how it works:
  1. Anybody can ask a question
  2. Anybody can answer
  3. The best answers are voted up and rise to the top

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

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)

share|improve this question
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 Jul 26 '12 at 14:59

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 :)

share|improve this answer
I'm off the project now but thanks for the suggestion. I will be sure to try it next time. – David Wilton Aug 8 '13 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 May 19 '14 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 – David Wilton May 20 '14 at 2:57

Your Answer


By posting your answer, you agree to the privacy policy and terms of service.

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