Frequently asked question

How do I select by attributes or create a query for a date field in ArcMap?

Last Published: April 25, 2020

Answer

Special DBMS-dependent delimiters are used for querying date fields. If you don't use a delimiter, or use an incorrect one, you will get an error message.

The following query examples will select a date in a layer based on Microsoft Access personal geodatabase data:

Code:
[DATE_FIELD] = #1970/8/17#


Code:
[DATE_FIELD] = DateSerial(1970,8,17)

Coverages, shapefiles and SDE geodatabases use a different standard:

Code:
"DATE_FIELD" = date '1970/8/17'

You should use native DBMS date formats when working with SDE geodatabases.

For more information, click the Help button in the Select Menu, Select by Attributes choice.

Article ID:000002752

Software:
  • ArcMap 8 x

Get help from ArcGIS experts

Contact technical support

Download the Esri Support App

Go to download options

Discover more on this topic