Select to view content in your preferred language

Query a specific date using the Search Widget

991
6
12-14-2011 11:22 AM
JakeSkinner
Esri Esteemed Contributor
Can anyone provide me the correct syntax to query a date using the Search widget?  I am using FlexViewer 2.5 and my data resides in a File Geodatabase.  I have the out-of-the-box Search widget set up, but I cannot figure out the correct syntax.  The values in the date field are month/day/year.  Ex:

12/14/2011
Tags (2)
0 Kudos
6 Replies
RobertScheitlin__GISP
MVP Emeritus
Jake,

   Try using: dateField = date '2011-12-14'
0 Kudos
JakeSkinner
Esri Esteemed Contributor
Hi Robert,

Thanks for the response.  I tried that, and I also tried:

date '2011-12-14 00:00:00'

Both return 'Unable to return query operation'.
0 Kudos
RobertScheitlin__GISP
MVP Emeritus
Jake,

   So you are trying to put this in the SearchWidget.xml?
0 Kudos
JakeSkinner
Esri Esteemed Contributor
Yes, that is correct.
0 Kudos
RobertScheitlin__GISP
MVP Emeritus
Jake,

  I would call your colleagues in tech support on this. I can get a date query to work for one of my date fields using ArcGIS Server 10 SP3 but I can not get it to work using ArcGIS Online map service that is 10 SP 1.
0 Kudos
RuyMartinez
Emerging Contributor
JSkinn3,
I had some date query issues and Robert helped me through it.  Here is the thread and it might help you out.
0 Kudos