REST API Query by Date

18573
3
Jump to solution
05-12-2010 08:17 AM
JordanParfitt
Occasional Contributor
I am trying to use the REST API to query by date. In the where field I want to enter something like this:

my_Date >= '06/15/2009 12:00:00 AM'

That is not working. I have tried many alternatives. Any help would be appreciated.

Sorry if this has been answered but I am having trouble searching the new forums.

Thanks,
Jay
1 Solution

Accepted Solutions
JordanParfitt
Occasional Contributor
A little more searching and....

"Accident_D" > date '2009-01-01 00:00:00'

That works...

Thanks All

View solution in original post

3 Replies
JordanParfitt
Occasional Contributor
A little more searching and....

"Accident_D" > date '2009-01-01 00:00:00'

That works...

Thanks All
RaviNarayanan
Esri Contributor
A little more searching and....

"Accident_D" > date '2009-01-01 00:00:00'

That works...

Thanks All


A bit more info regarding this. The syntax for date in the query should conform to the sytax that is supported by the underlying geodatabase. Please see section "Dates and time"  in the following help topic.
http://help.arcgis.com/en/arcgisdesktop/10.0/help/index.html#//00s500000033000000.htm

Thanks
0 Kudos
KirkKuykendall
Occasional Contributor III
I don't see a property exposed by the REST API that indicates what type of query syntax I should use.

How do I determine what database is being used by a mapservice layer?

Without know that, it is difficult to compose the appropriate date query syntax.

Thanks!