Issues with Historical Dates (pre-1900)

965
3
01-22-2020 12:32 PM
WrightKennedy
New Contributor II

Recently, I discovered a sneaky sorting bug for date/time values before 1900 30 December 1899 in date fields (ArcGIS Pro 2.4.3). The dates sort correctly but the times do not (see screenshots below). It also seems to cause features to drop when time is enabled for the feature layer and the time-span is set to hours or smaller.

I'm working with my organization to submit a bug report, but hopefully, by posting here, it will save some headaches for the next person who encounters this issue (or at least help to troubleshoot why order-dependent python scripts in the Calculate Field geoprocessing tool are failing).

   correct sort:

   incorrect sort:

   incorrect sort:

The work-around is to split year, month, day, and time into separate fields and use a custom sort, but this still doesn't solve the timeslider issues. Alternatively, if the range of dates is relatively small, shifting them to the 20th/21st century gets around the issue as well (e.g., +100 years), but the day of the week will be wrong.

Based on a few tests, it seems that Arcade might be a culprit for some of the issues. Sorting lists of pre-1900 dates/times stored in a date object (datetime module for python) works as expected. Additionally, features labeled in AGP based on the date field returned the wrong times (red labels in figure below) when using Arcade as the language in the expression builder (Label Class pane), but after I switched the language to python (or VB or js), the labels displayed the correct times (blue labels in figure below).

Has anyone found other issues or strange behavior while using pre-1900 dates/times in AGP date fields? 

Of course AGP isn't the only software to struggle with a y1k9c bug. Issues with historical dates in Excel:

Abandon all hope, ye who enter dates in Excel – UC3 :: California Digital Library

Differences between the 1900 and the 1904 date system - Office | Microsoft Docs 

3 Replies
MichaelSnook
Occasional Contributor III

Some of our staff just stumbled on something similar.  The user is trying to enter '6/24/1896' into a simple date field but the attribute field automatically changes to '6/25/1896'.  Any workarounds would be great to know.

Thanks!

 

0 Kudos
JoshuaBixby
MVP Esteemed Contributor

What version of Pro are you using?  I just tested in Pro 3.0.2, and when I enter '06/24/1896' it gets saved as '6/24/1896'.

0 Kudos
MichaelSnook
Occasional Contributor III

It happens specifically in a Pro Parcel Fabric for the 'Legal Start Date' on parcels.  It also only seems to happen when a time component is added, so, 6/11/1885 11:15 am becomes 6/12/1885 12:45 pm when the edits are applied.  It's just a standard date field and there are no date-related attribute rules associated with the feature class.  Note -- I have spot checked several different years/decades for attributes and it seems to happen only with pre 1900s

0 Kudos