HOW TO

Select date field records within a specified range using the Select By Attributes tool in ArcGIS Pro

Last Published: February 23, 2022

Summary

Feature layers with date and time (temporal) information stored can be used to select specific attributes for querying, exploring, analyzing, or modifying data.

The instructions demonstrate how to use the ArcGIS Pro Select By Attributes geoprocessing tool to identify specific ranges of date fields for further analysis. In this example, the UPDATED date field in the Schools_all feature class is used to identify the attribute fields within the range of 120 days before October 15, 2013, and 100 days before October 15, 2012.

Procedure

  1. Start ArcGIS Pro and open the project.
  2. In the Contents pane, right-click the feature class and click Attribute Table to open the Attribute Table pane.
How to open the Attribute Table of a feature class in the Contents pane
  1. In the feature class attribute table pane, click Select By Attributes The Select By Attributes icon in the Attribute Table to open the Select By Attribute geoprocessing tool.
How to open the Select By Attribute geoprocessing tool in the Attribute Table pane
  1. In the Select By Attributes tool dialog box, configure the following parameters.
    1. For Selection type, click the drop-down menu and select New selection.
    2. Enter the query expression in SQL mode.
Note:
By default, the query builder is in Clause mode. Toggle the SQL option on The SQL toggle icon in the Select By Attributes tool dialog box to open it in SQL mode.
  • To select records within a set number of days before the current date:
<field name> >= CURRENT_DATE()
AND
<field name> - <number of days> <= CURRENT_DATE()
  • To select multiple records with different dates:
<field name> >= date '<yyyy-mm-dd>' - <number of days> AND <field name> <= date '<yyyy-mm-dd>'
OR
<field name> >= date '<yyyy-mm-dd>' - <number of days> AND <field name> <= date '<yyyy-mm-dd>'
  1. Click the Verify button to validate the expression.
  2. Click OK.
The Select By Attributes dialog box with parameters to be filled

Article ID: 000027094

Software:
  • ArcGIS Pro 2 8 x
  • ArcGIS Pro 2 7 x
  • ArcGIS Pro 2 x

Receive notifications and find solutions for new or common issues

Get summarized answers and video solutions from our new AI chatbot.

Download the Esri Support App

Related Information

Discover more on this topic

Get help from ArcGIS experts

Contact technical support

Download the Esri Support App

Go to download options