Error: Not a legal OleAut date
Error Message
In some instances, when using the Select Layer By Attribute tool on a layer imported from ArcGIS Online, or attempting to open the attribute table of a feature class or a hosted feature service in ArcGIS Pro, the following error message is returned:
Error: Not a legal OleAut date.

Cause
This error occurs due to the following known causes:
- The date fields are empty and do not read as null.
- The date field values contain special characters, as shown in the image below.

Solution or Workaround
Depending on the cause, choose one of the methods provided to resolve the problem.
Note: Perform the following workarounds in ArcMap if the error prompt disallows the editing of the attribute table in ArcGIS Pro.
Assign null values to the empty fields
Replace the empty field values with nulls. Refer to FAQ: Is it possible to assign nulls to a field using the Field Calculator? for more information.
Remove the special characters from the date field values
To remove special characters in the field value, double-click the cell, select the special characters, and press Delete on the keyboard. Optionally, set the empty field values to null. Refer to FAQ: Is it possible to assign nulls to a field using the Field Calculator? for steps to do so.
Related Information
- ArcGIS Online: Work with date fields
- ArcGIS Pro: Date fields
- ArcGIS Pro: Find and Replace
- ArcGIS Pro: Edit a value in a table cell
Last Published: 2/19/2021
Article ID: 000024929
Software: ArcGIS Pro 2.7, 2.6.4, 2.6.3, 2.6.2, 2.6.1, 2.6, 2.5.2, 2.5.1, 2.5, 2.4.3, 2.4.2, 2.4.1, 2.4, 2.3.3, 2.3.2, 2.3.1, 2.3, 2.2.4, 2.2.3, 2.2.2, 2.2.1, 2.2, 2.1.3, 2.1.2, 2.1.1, 2.1, 2.0.1, 2.0