ERROR

Not a legal OleAut date

Last Published: June 5, 2024

Error Message

In some instances, when using the Select Layer By Attribute tool on a layer imported from ArcGIS Online, or querying a feature in ArcGIS Pro, 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.
Error message: Failed to load data. 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.
Screenshot of the attribute table with the special character '?'
  • The table contains a datetime value that is earlier than midnight, January 1, 100 CE. ArcGIS Pro uses the Microsoft ToOADate method to access dates stored as datetime types. This method does not support date and time values earlier than midnight, January 1, 100.

Solution or Workaround

Depending on the cause, choose one of the methods provided to resolve the problem.

Assign null values to the empty fields

Replace the empty field values with nulls. Refer to How To: Assign nulls to a field in ArcGIS Pro 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 How To: Assign nulls to a field in ArcGIS Pro for steps to do so.

Correct or exclude dates earlier than January 1, 100

If the table contains datetime values earlier than midnight, January 1, 100, confirm that the values are valid and correct those that are not.  If all values are correct and you cannot make changes to the data, you can do one of the following to work with the table and avoid the error message:

  • Create a view of the table that excludes the datetime column. This allows viewing and querying the data in the view. However, you will not be able to access any of the date information (even those later than January 1, 100) nor can you edit the data.
  • Create a view that casts the date field to a string field. You’ll be able to view all the dates, but you won’t be able to perform date queries or edit.
  • Publish a map image layer and copy the data. Add the map image layer to Map Viewer to view and query the data. You’ll be able to view all the dates without error, but you cannot edit the data.

Article ID: 000024929

Software:
  • ArcGIS Online
  • ArcGIS Pro 3 0
  • 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