ERROR

No es una fecha legal de OleAut

Last Published: June 5, 2024

Mensaje de error

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.

Causa

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.

Solución o solución alternativa

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.

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.

Id. de artículo: 000024929

Recibir notificaciones y encontrar soluciones a problemas nuevos o comunes

Obtenga respuestas resumidas y soluciones de vídeo de nuestro nuevo chatbot de IA.

Descargar la aplicación de soporte de Esri

Información relacionada

Descubrir más sobre este tema

Obtener ayuda de expertos en ArcGIS

Contactar con el soporte técnico

Descargar la aplicación de soporte de Esri

Ir a opciones de descarga