QueryTask for ORACLE Date Field

682
3
03-27-2011 03:00 PM
BradBarnell
New Contributor III
Is there some trick to getting the QueryTask to work on an ORACLE date field in the Silverlight API?  Here's what I have tried so far in the Where string:

MyFieldName = TO_DATE('2010-04-19 00:00:00','YYYY-MM-DD HH24:MI:SS')

MyFieldName = TO_DATE('2010-04-19','YYYY-MM-DD')

MyFieldName = TO_DATE('12/19/2010','MM,DD,YYYY')


The error message I get from the API is "Unable to complete Query operation"
0 Kudos
3 Replies
JenniferNery
Esri Regular Contributor
I think this might be a related thread: http://forums.arcgis.com/threads/14935-Query-on-Date-data-types.

Are you able to perform this query using the REST endpoint from your web browser? Can you compare this web request on Fiddler with the request made from using Silverlight app?
0 Kudos
JMcNeil
Occasional Contributor III
You will probably have to format the date...like your first attempt but try to add

MYDATEFIELD = To_Date('2011-03-28 00:00:00 AM','MM/DD/YYYY HH:MI:SS AM')

j
0 Kudos
BradBarnell
New Contributor III
Thanks for replys.  I tried various formats in the REST endpoint with no luck, but will continue with others.
0 Kudos