Trying to calculate burn roughs in ArcPro. No problem calculating in ArcGIS 10.8.
Burn rough2 = (Date1 - Last_burned)/365
Current_date and last_burned_date are date fields (month/day/year)
When I attempt to run I get following error:
Anyone know what changed from ArcGIS to ArcPro, and how to correct?
I thank you,
RRO
dates changed between python 2.7 and 3.x, you will have to check the appropriate python documentation and examples on the web. Here is an example of what is returned in python 3.11
d1 = datetime(2024, 1, 1)
import datetime
d1 = datetime.datetime(2024, 1, 1)
d2 = datetime.datetime(2024, 1, 31)
d2 - d1
datetime.timedelta(days=30)
(d2 - d1)/365
datetime.timedelta(seconds=7101, microseconds=369863)
so you will have to convert to your appropriate date format and or desired scalar value