Hello, I would like to symbolically represent the control status of a tree control. I have included a table from a database that contains the date of the next inspection. The column is called "next_inspection" in date format. I have created a column called "control_status". This field has to be calculated so that I can represent the symbols accordingly.
With the following code I can calculate the difference to today:
(datetime.datetime.now () - arcpy.time.ParseDateTimeString (! Next_inspection!)).Days
In addition, an "if then else" statement has to be added, for example:
> 0 days overdue
0-100 inspection due
<100 days checked
Can someone explain that to me?
Is it possible to read the date directly from an external database without having to include the table beforehand?
Can you write some pseudo code for what logic you want applied?
I'm not entirely sure what you mean about the external DB and not having a table beforehand, but a relate might be what you're envisaging. Essentials of relating tables—ArcMap | Documentation (arcgis.com)