<?xml version="1.0" encoding="UTF-8"?>
<rss xmlns:content="http://purl.org/rss/1.0/modules/content/" xmlns:dc="http://purl.org/dc/elements/1.1/" xmlns:rdf="http://www.w3.org/1999/02/22-rdf-syntax-ns#" xmlns:taxo="http://purl.org/rss/1.0/modules/taxonomy/" version="2.0">
  <channel>
    <title>topic Re: Arcade Script To Calculate Response Time From 2 Date Columns in Geoprocessing Questions</title>
    <link>https://community.esri.com/t5/geoprocessing-questions/arcade-script-to-calculate-response-time-from-2/m-p/1365372#M27113</link>
    <description>&lt;P&gt;Thank you for the response!&amp;nbsp; This has worked out great!&lt;/P&gt;&lt;P&gt;Mark&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
    <pubDate>Tue, 02 Jan 2024 15:11:19 GMT</pubDate>
    <dc:creator>MarkKlein</dc:creator>
    <dc:date>2024-01-02T15:11:19Z</dc:date>
    <item>
      <title>Arcade Script To Calculate Response Time From 2 Date Columns</title>
      <link>https://community.esri.com/t5/geoprocessing-questions/arcade-script-to-calculate-response-time-from-2/m-p/1363040#M27102</link>
      <description>&lt;P&gt;Hello All!&amp;nbsp; My first post to the Community so I hope I include the correct information to assist with my question!&lt;/P&gt;&lt;P&gt;I have been tasked with creating a dashboard for our calls for service and have no experience with Arcade.&amp;nbsp; I would like to calculate our average response times from when our car gets the dispatch (FirstDispatchTime) until they arrive (FirstArrive), eliminating null entries in the calculation.&amp;nbsp; A portion of the data export is below:&lt;/P&gt;&lt;P&gt;&lt;span class="lia-inline-image-display-wrapper lia-image-align-inline" image-alt="MarkKlein_0-1703082605329.png" style="width: 400px;"&gt;&lt;img src="https://community.esri.com/t5/image/serverpage/image-id/89602i207E7ADF2699E575/image-size/medium?v=v2&amp;amp;px=400" role="button" title="MarkKlein_0-1703082605329.png" alt="MarkKlein_0-1703082605329.png" /&gt;&lt;/span&gt;&lt;/P&gt;&lt;P&gt;All of the 'Seconds2' columns are internally calculated using the 'CallTime' column so that does not really reflect our departments response time as we have no control over how long dispatch holds the call.&lt;/P&gt;&lt;P&gt;Ideally, I would like the displayed result shown as 'mm:ss' on the dashboard indicator.&lt;/P&gt;&lt;P&gt;Any script suggestion would be greatly appreciated!&lt;/P&gt;&lt;P&gt;Thank You!&lt;/P&gt;&lt;P&gt;Mark Klein&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Wed, 20 Dec 2023 15:19:56 GMT</pubDate>
      <guid>https://community.esri.com/t5/geoprocessing-questions/arcade-script-to-calculate-response-time-from-2/m-p/1363040#M27102</guid>
      <dc:creator>MarkKlein</dc:creator>
      <dc:date>2023-12-20T15:19:56Z</dc:date>
    </item>
    <item>
      <title>Re: Arcade Script To Calculate Response Time From 2 Date Columns</title>
      <link>https://community.esri.com/t5/geoprocessing-questions/arcade-script-to-calculate-response-time-from-2/m-p/1363048#M27103</link>
      <description>&lt;P&gt;Arcade has a function, &lt;A href="https://developers.arcgis.com/arcade/function-reference/date_functions/#datediff" target="_blank"&gt;&lt;STRONG&gt;DateDiff&lt;/STRONG&gt;&lt;/A&gt;. Give it two date fields and specify the units, and it will return the value.&lt;/P&gt;&lt;PRE&gt;DateDiff($feature['FirstArrive'], $feature['FirstDispatchTime'], 'minutes')&lt;/PRE&gt;&lt;P&gt;You can use that to calcualte a new field in the data itself, or you could use it in the Dashboard to show the response time.&lt;/P&gt;&lt;P&gt;If you can't include it as a field calculation, you will want to look into creating a Data Expression, but that's a bit more advanced if you've never used Arcade. Is calculating the field an option?&lt;/P&gt;</description>
      <pubDate>Wed, 20 Dec 2023 15:30:01 GMT</pubDate>
      <guid>https://community.esri.com/t5/geoprocessing-questions/arcade-script-to-calculate-response-time-from-2/m-p/1363048#M27103</guid>
      <dc:creator>jcarlson</dc:creator>
      <dc:date>2023-12-20T15:30:01Z</dc:date>
    </item>
    <item>
      <title>Re: Arcade Script To Calculate Response Time From 2 Date Columns</title>
      <link>https://community.esri.com/t5/geoprocessing-questions/arcade-script-to-calculate-response-time-from-2/m-p/1365372#M27113</link>
      <description>&lt;P&gt;Thank you for the response!&amp;nbsp; This has worked out great!&lt;/P&gt;&lt;P&gt;Mark&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Tue, 02 Jan 2024 15:11:19 GMT</pubDate>
      <guid>https://community.esri.com/t5/geoprocessing-questions/arcade-script-to-calculate-response-time-from-2/m-p/1365372#M27113</guid>
      <dc:creator>MarkKlein</dc:creator>
      <dc:date>2024-01-02T15:11:19Z</dc:date>
    </item>
  </channel>
</rss>

