How to query nearest date (today) in ArcGIS Server REST?
ID NAME DATA 1 test 2013-06-01 13:00:00 2 test1 2013-06-01 16:00:00 3 test2 2013-07-01 18:00:00
Expected result : query ID = 3
This answer might not be the final solution, but I can provide some ideas about this question.
First, switch the Date to time format, according to: http://resources.arcgis.com/en/help/arcgis-rest-api/index.html#/Query_Map_Service_Dynamic_Layer/02r3000000z6000000/ (Parameter 'time')
Then compare all the time data and pick the biggest number by using the max statisticType:
outStatistics is supported on only those layers/tables that indicate suppportsStatistics is true.