amarsden

Query Task with Oracle date

Discussion created by amarsden on May 28, 2013
Latest reply on Feb 2, 2015 by elshafaeym
Hi

I'm having issues with a query task against data in an Oracle SDE

I have tried


       queryTask = new esri.tasks.QueryTask("http://........../MapServer/0");


        //build query filter
        query = new esri.tasks.Query();
        query.returnGeometry = false;
        query.outFields = ['*'];
        query.where = "DATE_CREATED > TO_DATE('2004-10-04 00:00:00','YYYY-MM-DD HH24:MI:SS')";
        queryTask.execute(query, showResults);




But get  -

dojo.io.script error
Error {code: 400, message: "Unable to complete operation.", details: Array[0], log: undefined}





not sure what else to try, the query as shown works fine in ArcMap (where I copied it from)

Cheers

ACM

Outcomes