I have a shapefile of about 175 points that correspond to projects. Each project has a "contract deadline" field and a "months until deadline" field (see attached screenshot).
I want the "months until deadline" field to automatically update over time based off the date.
For example, a deadline of 12/31/2021 would have 4 "months until deadline" as of August 31. Instead of having to manually updated this every month, I'd like Arc to update automatically based on the current day of the year.
Any way to do this or tips of how to do this?
The end product will be a map of my points that show the points with a range of colors displaying the "months until deadline" field.
One way that I think you could automate this is create a Model in Modelbuilder that does the GP work on the shapefile. Then export it out as a Python script and associate the Python script with Windows Task Scheduler so it runs every day. For example the Arcade expression I used in the screen grab does the month calculation for the difference between Contract Deadline and Months Until Deadline.
Thanks for the reply. I think i sort of got it to work..?
I could calculate TimeDiff between Todays date and the "Contract Deadline", but now the goal is for that "Today" field to update essentially everyday or week. It wouldn't be horribly annoying to recaculate manually once in awhile but would prefer it auto calculates.
This map is in arcpro right now but will go on ArcGIS Online, is that function available on ArcGIS Online
One thing you can do is change the Field Type from a Float/Double to a Short Integer. That way you get whole months vs. something like 4.112131 as a value. It would then be 3 or 4 or 8. The automation part is probably best done using Python via Windows Task Scheduler so it does it automatically at a certain date/time.
Arcade is a platform wide expression language so that calculation will work in ArcGIS Online as well. If you're sharing the shapefile out as a web layer, you can overwrite the web layer from ArcGIS Pro every week if desired and any web maps/apps pointing to that web layer would update.