I am working with an ArcGIS Sever 10.41 rest service that contains many scientific records. These records have a date field called sample_date but it's stored as a string. See below.

sample_date ( type: esriFieldTypeString , alias: sample_date , length: 8000 )

I've been trying to query the last year's records to no avail. Since this field is stored as a string I was trying to just get those records which contained the string 2018 but that did not work and returned empty records. See below.


Any suggestions for a better approach to querying all records from the last 12 months even though the field is stored as a string?

  • Does 10.41 server support SQL queries? CAST("FIELDNAME" as DATE) – Mapperz Feb 16 at 22:20
  • This question is misleading in the use of "date" to refer to a string field. If it's a string field, all you need to do is use the like operator correctly, which would involve URL-encoding the wildcard character. – Vince Feb 16 at 23:22

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Browse other questions tagged or ask your own question.