错误

错误:非合法 OleAut 日期

Last Published: June 5, 2024

错误消息

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.

原因

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.

解决方案或解决方法

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: 000024929

接收通知并查找新问题或常见问题的解决方案

从我们全新的 AI 聊天机器人中获得简明答案和视频解决方案。

下载 Esri 支持应用程序

相关信息

发现关于本主题的更多内容

获取来自 ArcGIS 专家的帮助

联系技术支持部门

下载 Esri 支持应用程序

转至下载选项