I have problem with the code below. I try to query based on date for the definition layer. It works if I use Objectid. Ideas? Thanks .
ArcGISDynamicMapServiceLayer layer = new ArcGISDynamicMapServiceLayer("http://gissvr/arcgis/rest/services/General/forma_my/MapServer");
//String q = "OBJECTID = 404" ; //this query returns and display
String q = "dateT > date '2014-08-01 00:00:00'" ; //nothing
layerDefs.put(Integer.valueOf(0),q );
layer.setLayerDefinitions(layerDefs);
mMapView.addLayer(layer);
I found myself the answer.Should use; to_date('8/1/2014','MM/DD/YY')