HOW TO
Arcade is an expression language that can be used across the ArcGIS platform. The Arcade Date functions provide methods to create and acquire properties of date objects. For example, the DateAdd() and DateDiff() functions can be used to adjust the date based on specified intervals, and the Now() function to obtain the client's local time.
This article provides the workflow to calculate the difference between two date fields using the Arcade DateDiff() function.
var startDate = Date($feature.startDateField) var endDate = Date($feature.endDateField) var result = DateDiff(endDate, startDate, 'minutes') return result
Note: To calculate the difference between the two date fields in other units, such as hours, seconds, or days, use the same expression and replace 'minute' with the desired unit of measurement.
Get help from ArcGIS experts
Download the Esri Support App