<?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: Quarantine Patient release time in ArcGIS Online Questions</title>
    <link>https://community.esri.com/t5/arcgis-online-questions/quarantine-patient-release-time/m-p/1020783#M38210</link>
    <description>&lt;P&gt;My Javascript is pretty poor, but the following returned what I was suggesting (I manually entered the start date as I have no data).&lt;/P&gt;&lt;LI-CODE lang="javascript"&gt;var dateDiff = DateDiff(Now(), "2021-01-01 00:00:00", "days")

if (dateDiff &amp;gt;= 14){
    return "Quarantine Expired"
}
else{
    return "In Quarantine"
}&lt;/LI-CODE&gt;&lt;P&gt;yours would look like this I guess:&lt;/P&gt;&lt;LI-CODE lang="markup"&gt;var dateDiff = DateDiff(Now(), $feature["Q_Start"], "days")

if (dateDiff &amp;gt;= 14){
    return "Quarantine Expired"
}
else{
    return "In Quarantine"
}&lt;/LI-CODE&gt;&lt;P&gt;regards the symbology, I would use this expression to create a new field such as "Quarantine_Y_N", then just use the normal symbology window to classify by field value (unique values etc.)&lt;/P&gt;&lt;P&gt;The decimal issue shouldn't be a problem, but it depends of course if you mean 14 days inclusive of that day so far, or 14*24 hours.&lt;/P&gt;&lt;P&gt;Although not rocket science, It would hurt my head too much at the moment to figure that out.&lt;/P&gt;</description>
    <pubDate>Wed, 27 Jan 2021 22:47:15 GMT</pubDate>
    <dc:creator>DavidPike</dc:creator>
    <dc:date>2021-01-27T22:47:15Z</dc:date>
    <item>
      <title>Quarantine Patient release time</title>
      <link>https://community.esri.com/t5/arcgis-online-questions/quarantine-patient-release-time/m-p/1018854#M38123</link>
      <description>&lt;P&gt;Greetings All,&lt;/P&gt;&lt;P&gt;I would like to use ArcGIS Dashboard to show the remaining Quarantine time per patient. For Example, if a person comes into the country, they are required to quarantine for 14 days... Once a location point is created at their quarantine location, I would like to have a countdown showing the days remaining for each quarantine patient. When day 14 arrives, I would like that point to turn green indicating that the quarantine time is over. Based on my research it appears that I will have to do this from Arcade in ArcGIS online. Grateful if someone can provide some details of how to accomplish this. Thanks in advance&lt;/P&gt;</description>
      <pubDate>Thu, 21 Jan 2021 21:16:42 GMT</pubDate>
      <guid>https://community.esri.com/t5/arcgis-online-questions/quarantine-patient-release-time/m-p/1018854#M38123</guid>
      <dc:creator>TCPlanningDepartment</dc:creator>
      <dc:date>2021-01-21T21:16:42Z</dc:date>
    </item>
    <item>
      <title>Re: Quarantine Patient release time</title>
      <link>https://community.esri.com/t5/arcgis-online-questions/quarantine-patient-release-time/m-p/1018866#M38127</link>
      <description>&lt;P&gt;Never done it in arcade so just take this as an uneducated suggestion:&lt;/P&gt;&lt;P&gt;The Date functions&amp;nbsp;&lt;A href="https://developers.arcgis.com/arcade/function-reference/date_functions/#now" target="_blank" rel="noopener"&gt;Date Functions | ArcGIS for Developers&lt;/A&gt;&lt;/P&gt;&lt;P&gt;seem to list a DateDiff() and a Now() function.&lt;/P&gt;&lt;P&gt;I think creating a custom field/popup where you do something like&lt;/P&gt;&lt;P&gt;DateDiff(Now(), QuarantineDateTimeField, "days")&amp;nbsp;&lt;/P&gt;&lt;P&gt;Then use classified symbology where x &amp;gt;=14 and x&amp;lt;14&lt;/P&gt;&lt;P&gt;but take that with a big pinch of trial and error.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Thu, 21 Jan 2021 21:30:20 GMT</pubDate>
      <guid>https://community.esri.com/t5/arcgis-online-questions/quarantine-patient-release-time/m-p/1018866#M38127</guid>
      <dc:creator>DavidPike</dc:creator>
      <dc:date>2021-01-21T21:30:20Z</dc:date>
    </item>
    <item>
      <title>Re: Quarantine Patient release time</title>
      <link>https://community.esri.com/t5/arcgis-online-questions/quarantine-patient-release-time/m-p/1018874#M38128</link>
      <description>Received with thanks. I will give this a try when I get to work tomorrow. You said you’ve never done it in arcade... can it be done in ArcGIS Dashboard?&lt;BR /&gt;</description>
      <pubDate>Thu, 21 Jan 2021 21:37:40 GMT</pubDate>
      <guid>https://community.esri.com/t5/arcgis-online-questions/quarantine-patient-release-time/m-p/1018874#M38128</guid>
      <dc:creator>TCPlanningDepartment</dc:creator>
      <dc:date>2021-01-21T21:37:40Z</dc:date>
    </item>
    <item>
      <title>Re: Quarantine Patient release time</title>
      <link>https://community.esri.com/t5/arcgis-online-questions/quarantine-patient-release-time/m-p/1018882#M38129</link>
      <description>&lt;P&gt;When I say I've never done it, that's just my inadequacy with arcade.&amp;nbsp; I'd bet my left kidney it can easily be done however.&lt;/P&gt;&lt;P&gt;I'll give it a test tomorrow if you like, re the dashboard you must also be able to do it with a filter (no kidney this time) but I think having the extra field with the number of days since quarantine would be the best option.&lt;/P&gt;</description>
      <pubDate>Thu, 21 Jan 2021 21:44:24 GMT</pubDate>
      <guid>https://community.esri.com/t5/arcgis-online-questions/quarantine-patient-release-time/m-p/1018882#M38129</guid>
      <dc:creator>DavidPike</dc:creator>
      <dc:date>2021-01-21T21:44:24Z</dc:date>
    </item>
    <item>
      <title>Re: Quarantine Patient release time</title>
      <link>https://community.esri.com/t5/arcgis-online-questions/quarantine-patient-release-time/m-p/1020767#M38208</link>
      <description>&lt;P&gt;Greetings David,&lt;/P&gt;&lt;P&gt;I made my first attempt with your solution (i.e. using the datediff function). Please see attached image. It seems to correctly do the calculation except with the decimal figures. I'm guessing there needs to be a &lt;STRONG&gt;round&lt;/STRONG&gt; function somewhere based on my research? Also, can you explain the symbology part a bit more... I'm using ArcGIS online and Im guessing the last part of your solution refers to "change style" and adding a new expression in there? Please advise&lt;span class="lia-inline-image-display-wrapper lia-image-align-inline" image-alt="datediff_results.jpg" style="width: 901px;"&gt;&lt;img src="https://community.esri.com/t5/image/serverpage/image-id/4717i85083786928674ED/image-size/large?v=v2&amp;amp;px=999" role="button" title="datediff_results.jpg" alt="datediff_results.jpg" /&gt;&lt;/span&gt;&lt;/P&gt;</description>
      <pubDate>Wed, 27 Jan 2021 22:30:48 GMT</pubDate>
      <guid>https://community.esri.com/t5/arcgis-online-questions/quarantine-patient-release-time/m-p/1020767#M38208</guid>
      <dc:creator>TCPlanningDepartment</dc:creator>
      <dc:date>2021-01-27T22:30:48Z</dc:date>
    </item>
    <item>
      <title>Re: Quarantine Patient release time</title>
      <link>https://community.esri.com/t5/arcgis-online-questions/quarantine-patient-release-time/m-p/1020783#M38210</link>
      <description>&lt;P&gt;My Javascript is pretty poor, but the following returned what I was suggesting (I manually entered the start date as I have no data).&lt;/P&gt;&lt;LI-CODE lang="javascript"&gt;var dateDiff = DateDiff(Now(), "2021-01-01 00:00:00", "days")

if (dateDiff &amp;gt;= 14){
    return "Quarantine Expired"
}
else{
    return "In Quarantine"
}&lt;/LI-CODE&gt;&lt;P&gt;yours would look like this I guess:&lt;/P&gt;&lt;LI-CODE lang="markup"&gt;var dateDiff = DateDiff(Now(), $feature["Q_Start"], "days")

if (dateDiff &amp;gt;= 14){
    return "Quarantine Expired"
}
else{
    return "In Quarantine"
}&lt;/LI-CODE&gt;&lt;P&gt;regards the symbology, I would use this expression to create a new field such as "Quarantine_Y_N", then just use the normal symbology window to classify by field value (unique values etc.)&lt;/P&gt;&lt;P&gt;The decimal issue shouldn't be a problem, but it depends of course if you mean 14 days inclusive of that day so far, or 14*24 hours.&lt;/P&gt;&lt;P&gt;Although not rocket science, It would hurt my head too much at the moment to figure that out.&lt;/P&gt;</description>
      <pubDate>Wed, 27 Jan 2021 22:47:15 GMT</pubDate>
      <guid>https://community.esri.com/t5/arcgis-online-questions/quarantine-patient-release-time/m-p/1020783#M38210</guid>
      <dc:creator>DavidPike</dc:creator>
      <dc:date>2021-01-27T22:47:15Z</dc:date>
    </item>
    <item>
      <title>Re: Quarantine Patient release time</title>
      <link>https://community.esri.com/t5/arcgis-online-questions/quarantine-patient-release-time/m-p/1021028#M38223</link>
      <description>&lt;DIV&gt;Hi David,&lt;/DIV&gt;&lt;DIV&gt;&amp;nbsp;&lt;/DIV&gt;&lt;DIV&gt;It always amazes me how quickly you respond. Love it! Thank you for taking the time out with this. Here's what I came up with after a few fiddling (see attached).&amp;nbsp; Days in Quarantine is the arcade expression attached and the symbology you suggested (ie Quarantine Expired -Green and In Quarantine - Red). Now I may have to use Dashboard Beta to utilize this expression. I have a follow-up question however; Can this be done solely in ArcGIS Dashboard (not dashboard Beta)?&lt;/DIV&gt;&lt;DIV&gt;&amp;nbsp;&lt;/DIV&gt;</description>
      <pubDate>Thu, 28 Jan 2021 15:45:15 GMT</pubDate>
      <guid>https://community.esri.com/t5/arcgis-online-questions/quarantine-patient-release-time/m-p/1021028#M38223</guid>
      <dc:creator>TCPlanningDepartment</dc:creator>
      <dc:date>2021-01-28T15:45:15Z</dc:date>
    </item>
    <item>
      <title>Re: Quarantine Patient release time</title>
      <link>https://community.esri.com/t5/arcgis-online-questions/quarantine-patient-release-time/m-p/1021051#M38224</link>
      <description>&lt;P&gt;Glad it worked - Also you might just add a final Else statement to catch any cases where the logical test fail (e.g. a bad date has been entered) and then return "Error" or something.&amp;nbsp; You can then easily find those records, but as it stands, those records wouldn't be populated anyway so you could easily identify them I guess (but it's less explicit).&lt;/P&gt;&lt;P&gt;Also just be aware of the 14 *24 hours thing still.&lt;/P&gt;&lt;P&gt;I've never used the beta if I'm honest, but my experience from a normal dashboard is that it would absolutely be possible - your dashboard links to a webmap which has a new custom field which you symbolise as-normal from, and can use to power any dashboard gauges, filters, indicators etc. - same as with any other field.&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Thu, 28 Jan 2021 16:10:37 GMT</pubDate>
      <guid>https://community.esri.com/t5/arcgis-online-questions/quarantine-patient-release-time/m-p/1021051#M38224</guid>
      <dc:creator>DavidPike</dc:creator>
      <dc:date>2021-01-28T16:10:37Z</dc:date>
    </item>
  </channel>
</rss>

