I have a hosted feature service in AGOL that will be updated via a python script. The data shows building permits for the past couple years and will be updated frequently. The end goal is a dashboard to show current permit status (applied, issued, closed) and how long a permit takes to go from 'applied' to 'approved'. I have four date fields for Applied, Approved, Issued, Finaled. In the data pulled from our permitting system, some of those dates are null (for instance if a permit has been applied for but not yet approved) However, once it gets imported as a gdb table and then transformed to a point layer, those null dates (that I do need to be null so I can see what status a permit should have) default to 12/30/1899. From what I have been reading, this is expected behavior for AGOL date fields. But how do people handle these values? I don't want to display that for citizens who will use the dashboard as that would be confusing. I also can't use my method of calculating permit status (which was going to be checking if certain date fields were null). So how does everyone else handle their date field default values?
Hi @OliviaE,
Did you share the data as a web layer to ArcGIS Online?
Are the date fields set to allow null values when the layer is shared?
Do you see the value 12/30/1899 in ArcGIS Online, in ArcGIS Pro, or both?
If the date fields are set to allow null values, they should be capable of retaining null values rather defaulting to 12/30/1899.
One way to overwrite the values would be to use the Field calculator to filter all the values of 12/30/1899 and set them to null, however, if you ensure that the date fields are set to allow null values you shouldn't need to do this step.
Hi @EmilyGeo yes it is shared as a hosted feature service. I do see the 12/30/1899 values in both ArcPro and AGOL, which is odd because they are set to accept null values. I'm using a script to process data from a csv all the way to posting it to AGOL so I'd rather not have to rely on field calculator to take care of those values, especially since they will be updated at least weekly, maybe even nightly. I think the default date is added when it goes from a csv to a gdb table but I was reading some things that seem to indicate that AGOL will add the default date if it is null anyway. So I'm not sure if I need to handle it on the ArcPro side or AGOL side.
Hi @OliviaE,
Both ArcGIS Online and Pro should retain Null values when the field is configured to allow them. I think you'll need to figure out during which step in the value is changed from Null to the default value in order to pin point the problem. I'm happy to take a look at the layer if you can share a link. Otherwise,don't hesitate to contact our Technical Support team for further assistance.