Select to view content in your preferred language

Default date when creating a new feature

1140
3
01-18-2023 01:09 PM
DIwanicka
Emerging Contributor

Hello,

Has anyone else had the issue of the default date field when creating a new feature in a Web Feature Layer is set to 1/1/1970? I have tried creating a self hosted feature on our portal and a enterprise geodatabase published feature layer and both give me the same result. Is there a configuration that I need to check in Civil3D or is this a ArcGIS for AutoCAD issue?

.Create feature dialogCreate feature dialog

0 Kudos
3 Replies
DanWade
Esri Contributor

Hello,

What you are seeing as the default date has nothing to do with the Autodesk product, per se, but actually enterprise database technology. The date you are seeing, 1/1/1970, is a universal default date called (EPOCH or Unix time). Here are a few pages that mention this:

ArcGIS Arcade > Date functions


ArcGIS Survey123 > Epoch time and decimal time

Wikipedia > Unix time

ArcGIS Blog > Discusses UTC time

If you were to open the same Web Feature Layer in the web Map Viewer those <NULL> fields would actually be blank. However, in Autodesk verticals for the null numeric or date field the null value is actually filled in with what looks like a number and or in this case a date when in fact this is a default place holder. I you want to avoid seeing the default of "1/1/1970" a default date value could be set on the ArcGIS side that is then displayed instead within ArcGIS for AutoCAD, like so:

date01.png

date02.png

0 Kudos
DIwanicka
Emerging Contributor

Thanks for the answer Dan. where would I set the default date? Would it be an attribute rule in ArcGIS Pro or an Arcade expression in Portal? I understand the approach you are taking but not how to do it.

 

Thanks,

 

Don

0 Kudos
DanWade
Esri Contributor

Hello Don,

A default value for any field can be specified during the Feature Class creation workflow in ArcGIS Pro. I would think when a hosted feature layer is created the default values can be set at time of creation as well, or perhaps modified after the layer is created from the data view.

ArcGIS Pro > Assign Default To Field (Data Management) 

For a more specific answer perhaps a case with Esri Technical Support would be better suited to the workflow you might require.

0 Kudos