English

FAQ: How are date fields queried in an ArcIMS Image Service vs. an ArcMap Service?

Question

How are date fields queried in an ArcIMS Image Service vs. an ArcMap Service?

Answer

ArcIMS Image Service
To query date fields with an ArcIMS Image Service, the following syntax is used in the 'where' attribute of SPATIALQUERY:

{ts 'YYYY-MM-DD hh:mi:ss'}

This format cannot be used with ArcMap Services.

ArcMap Service
To query date fields of an ArcMap Service, different delimiters are used, depending on the data type that the map is referencing. Date fields in coverages, shapefiles and ArcSDE geodatabases comply with SQL standards, and are delimited as shown in the example below:

"DATE_FIELD" = date '1970-8-27'

Date fields in personal geodatabases are delimited as shown in this example:

[DATE_FIELD] = #1970/8/27#

Note:
Date field formats that are supported by native databases may also be used when working with ArcSDE geodatabases.