<?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: Web map symbols by time range in ArcGIS Online Questions</title>
    <link>https://community.esri.com/t5/arcgis-online-questions/web-map-symbols-by-time-range/m-p/1065715#M40475</link>
    <description>&lt;P&gt;I think I solved it. Here is what I did and it seems to be working they way I want it.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;var repTime = Date($feature["activity_date"]);&lt;BR /&gt;var curTime = Now();&lt;BR /&gt;var age = DateDiff(curTime, repTime, 'minutes');&lt;/P&gt;&lt;P&gt;if(age &amp;lt;30) {&lt;BR /&gt;return '&amp;lt;30 min ago';&lt;BR /&gt;}&lt;BR /&gt;else if(age &amp;gt;=30 &amp;amp;&amp;amp; age &amp;lt;=60) {&lt;BR /&gt;return '30-60 min'&lt;BR /&gt;}&lt;BR /&gt;else {&lt;BR /&gt;return '&amp;gt;60 min'&lt;BR /&gt;}&lt;/P&gt;</description>
    <pubDate>Mon, 07 Jun 2021 17:58:16 GMT</pubDate>
    <dc:creator>AndyGeo</dc:creator>
    <dc:date>2021-06-07T17:58:16Z</dc:date>
    <item>
      <title>Web map symbols by time range</title>
      <link>https://community.esri.com/t5/arcgis-online-questions/web-map-symbols-by-time-range/m-p/1065363#M40457</link>
      <description>&lt;P&gt;Hello all,&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;I am trying to build a map that shows points from a Survey based on the age of the submission.&lt;/P&gt;&lt;P&gt;I am trying to get the points to change color based on their age from the current timestamp. I'm sure I have something wrong in the code (which is not my strong suit). I found this code in the forum from a few years ago. It was built using 2 variables plus an else = current option. I need to have at least 3 time variables with time ranges. Any help is greatly appreciated.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Thanks,&lt;/P&gt;&lt;P&gt;Andy&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;For records less than 30 min = Green&lt;/P&gt;&lt;P&gt;For records &amp;gt;30&amp;lt;60 min = Orange&lt;/P&gt;&lt;P&gt;For records &amp;gt;60 min = Red&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;var time1 = Date($feature.CreationDate)&lt;BR /&gt;if(DateDiff(Now(), time1, 'minutes')&amp;lt;30){&lt;BR /&gt;Var Status = "&amp;lt;30 min";&lt;BR /&gt;}&lt;BR /&gt;else if(DateDiff(Now(), time1, 'minutes')&amp;gt;30&amp;lt;60){&lt;BR /&gt;var Status = "&amp;gt;30&amp;lt;60 min";&lt;BR /&gt;}&lt;BR /&gt;else if(DateDiff(Now(), time1, 'minutes')&amp;gt;60){&lt;BR /&gt;var Status = "&amp;gt;60 min";&lt;BR /&gt;}&lt;BR /&gt;return Status&lt;/P&gt;</description>
      <pubDate>Sat, 05 Jun 2021 01:08:13 GMT</pubDate>
      <guid>https://community.esri.com/t5/arcgis-online-questions/web-map-symbols-by-time-range/m-p/1065363#M40457</guid>
      <dc:creator>AndyGeo</dc:creator>
      <dc:date>2021-06-05T01:08:13Z</dc:date>
    </item>
    <item>
      <title>Re: Web map symbols by time range</title>
      <link>https://community.esri.com/t5/arcgis-online-questions/web-map-symbols-by-time-range/m-p/1065715#M40475</link>
      <description>&lt;P&gt;I think I solved it. Here is what I did and it seems to be working they way I want it.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;var repTime = Date($feature["activity_date"]);&lt;BR /&gt;var curTime = Now();&lt;BR /&gt;var age = DateDiff(curTime, repTime, 'minutes');&lt;/P&gt;&lt;P&gt;if(age &amp;lt;30) {&lt;BR /&gt;return '&amp;lt;30 min ago';&lt;BR /&gt;}&lt;BR /&gt;else if(age &amp;gt;=30 &amp;amp;&amp;amp; age &amp;lt;=60) {&lt;BR /&gt;return '30-60 min'&lt;BR /&gt;}&lt;BR /&gt;else {&lt;BR /&gt;return '&amp;gt;60 min'&lt;BR /&gt;}&lt;/P&gt;</description>
      <pubDate>Mon, 07 Jun 2021 17:58:16 GMT</pubDate>
      <guid>https://community.esri.com/t5/arcgis-online-questions/web-map-symbols-by-time-range/m-p/1065715#M40475</guid>
      <dc:creator>AndyGeo</dc:creator>
      <dc:date>2021-06-07T17:58:16Z</dc:date>
    </item>
  </channel>
</rss>

