HOW TO

Select date attributes within 'days from today' in ArcGIS Pro using Select by attributes with SQL

Last Published: April 28, 2022

Summary

The steps provided describe how to select date attributes within a certain number of days from the present in ArcGIS Pro using Select by Attributes with an SQL expression.

Procedure

For example, to select records within 90 days from today:

  1. In ArcGIS Pro, go to the attribute table containing the records to filter, and click Select by Attributes.
  2. Toggle the SQL button on, as shown in the next image.
toggling the SQL option in Select by Attributes
  1. In the SQL expression box, type the following expression:
    • Where date is the date field name, and 90 is the number of the days of the period in question.
date >= CURRENT_DATE()
AND
date - 90 <= CURRENT_DATE()
  1. Run the tool.
In the image below, the date field has been selected for the Input Rows, and rows are now selected that meet the desired time constraints.
image.png
 

Article ID: 000026520

Software:
  • ArcGIS Pro

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