Friday 22 February 2019

Automatically adding date to attribute table in ArcGIS 10.3.1 for Desktop?


I am using ArcGIS 10.3.1 for Desktop.


I am working on a polygon layer in GDB file and i want that every feature that have been created in the map will be the date of creation (date and datetime). I created a field named "date" and choose "Date" in the Data Type


enter image description here


but the problem is that when i digitized a polygon in the map, the date hasn't added to the attribute table:


enter image description here



Answer




You appear to be confusing "attributes" and "values". By selecting the [Data Type] as "date" you are informing ArcGIS that this field or column will contain dates. You have not told ArcGIS what those dates are. If you were to add another field or column and set the [Data Type] as "text" would you expect Arc to populate it with the word "text"?


The [Data Type] is important because in GDBs (and many other database types) you cannot mix data types within the same field or column. With your "Date" data type you can enter dates. You could not enter the text "Date not recorded".


As suggested in the comment, Editor Tracking might suit your needs. In order to enable it, open Arc Catalog and navigate to your feature class.


Right click > manage > enable editor tracking


enter image description here


No comments:

Post a Comment

arcpy - Changing output name when exporting data driven pages to JPG?

Is there a way to save the output JPG, changing the output file name to the page name, instead of page number? I mean changing the script fo...