<?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: Only display points if today is Monday through Friday. in Mapping Questions</title>
    <link>https://community.esri.com/t5/mapping-questions/only-display-points-if-today-is-monday-through/m-p/65513#M764</link>
    <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;actually I only want the points to&amp;nbsp;even show up at all&amp;nbsp;if TODAY (AKA the current date/day of the week) &amp;nbsp;is Monday, Tues, Wed, Thurs or Friday.&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
    <pubDate>Thu, 20 Apr 2017 21:17:07 GMT</pubDate>
    <dc:creator>NinaRihn</dc:creator>
    <dc:date>2017-04-20T21:17:07Z</dc:date>
    <item>
      <title>Only display points if today is Monday through Friday.</title>
      <link>https://community.esri.com/t5/mapping-questions/only-display-points-if-today-is-monday-through/m-p/65511#M762</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;I have an MXD&amp;nbsp; that displays open offices based on&amp;nbsp;the&amp;nbsp; definition query:&amp;nbsp;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Hours.Open &amp;lt; CURRENT_TIME and Hours.Close &amp;gt; CURRENT_TIME&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;I would like to make it so&amp;nbsp;the&amp;nbsp;points don't display on Saturday and Sunday and only display Mon through Friday (since they are all only open on weekdays).&amp;nbsp;&amp;nbsp; Is this possible?&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;This mxd is ultimately used in a web service served by&amp;nbsp;an AGOL map, so if there is a way to filter this in AGOL that would be acceptable.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Thu, 20 Apr 2017 16:21:05 GMT</pubDate>
      <guid>https://community.esri.com/t5/mapping-questions/only-display-points-if-today-is-monday-through/m-p/65511#M762</guid>
      <dc:creator>NinaRihn</dc:creator>
      <dc:date>2017-04-20T16:21:05Z</dc:date>
    </item>
    <item>
      <title>Re: Only display points if today is Monday through Friday.</title>
      <link>https://community.esri.com/t5/mapping-questions/only-display-points-if-today-is-monday-through/m-p/65512#M763</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;If the point feature class also has a field, for example Mon_Fri, using a code/numeric format, then yes.&amp;nbsp; For example, if the Mon_Fri attribute field is binary 1 or 0, 1 being open, 0 being closed, then add to your Definition Query Mon_Fri = 1.&amp;nbsp; The points displayed will be daily hours and M-F offices.&amp;nbsp; Make sense?&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Thu, 20 Apr 2017 16:37:15 GMT</pubDate>
      <guid>https://community.esri.com/t5/mapping-questions/only-display-points-if-today-is-monday-through/m-p/65512#M763</guid>
      <dc:creator>Robert_LeClair</dc:creator>
      <dc:date>2017-04-20T16:37:15Z</dc:date>
    </item>
    <item>
      <title>Re: Only display points if today is Monday through Friday.</title>
      <link>https://community.esri.com/t5/mapping-questions/only-display-points-if-today-is-monday-through/m-p/65513#M764</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;actually I only want the points to&amp;nbsp;even show up at all&amp;nbsp;if TODAY (AKA the current date/day of the week) &amp;nbsp;is Monday, Tues, Wed, Thurs or Friday.&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Thu, 20 Apr 2017 21:17:07 GMT</pubDate>
      <guid>https://community.esri.com/t5/mapping-questions/only-display-points-if-today-is-monday-through/m-p/65513#M764</guid>
      <dc:creator>NinaRihn</dc:creator>
      <dc:date>2017-04-20T21:17:07Z</dc:date>
    </item>
    <item>
      <title>Re: Only display points if today is Monday through Friday.</title>
      <link>https://community.esri.com/t5/mapping-questions/only-display-points-if-today-is-monday-through/m-p/65514#M765</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;I don't think there is an easy way to do this with a definition query. The way you would &lt;EM&gt;think&lt;/EM&gt; this would work would be something like:&lt;/P&gt;&lt;PRE class="line-numbers language-sql"&gt;&lt;CODE&gt;EXTRACT&lt;SPAN class="punctuation token"&gt;(&lt;/SPAN&gt;DOW &lt;SPAN class="keyword token"&gt;FROM&lt;/SPAN&gt; &lt;SPAN class="keyword token"&gt;CURRENT_TIMESTAMP&lt;/SPAN&gt;&lt;SPAN class="punctuation token"&gt;)&lt;/SPAN&gt; &lt;SPAN class="operator token"&gt;&amp;gt;=&lt;/SPAN&gt; &lt;SPAN class="string token"&gt;"FIRSTDAYOPEN"&lt;/SPAN&gt; &lt;SPAN class="operator token"&gt;AND&lt;/SPAN&gt; EXTRACT&lt;SPAN class="punctuation token"&gt;(&lt;/SPAN&gt;DOW &lt;SPAN class="keyword token"&gt;FROM&lt;/SPAN&gt; &lt;SPAN class="keyword token"&gt;CURRENT_TIMESTAMP&lt;/SPAN&gt;&lt;SPAN class="punctuation token"&gt;)&lt;/SPAN&gt; &lt;SPAN class="operator token"&gt;&amp;lt;=&lt;/SPAN&gt; &lt;SPAN class="string token"&gt;"LASTDAYOPEN"&lt;/SPAN&gt;‍&lt;SPAN class="line-numbers-rows"&gt;&lt;SPAN&gt;‍&lt;/SPAN&gt;&lt;/SPAN&gt;&lt;/CODE&gt;&lt;/PRE&gt;&lt;P&gt;&lt;SPAN&gt;...which relies on a column populated for first and last open (Monday = 1 and Friday = 5) and compares the current DOW (day of week) to those values. However, ArcGIS's flavour of SQL only supports&amp;nbsp;&lt;SPAN style="color: #4d4d4d; background-color: #ffffff;"&gt;YEAR, MONTH, DAY, HOUR, MINUTE, or SECOND (not DOW).&lt;/SPAN&gt;&lt;/SPAN&gt;&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Thu, 20 Apr 2017 21:33:34 GMT</pubDate>
      <guid>https://community.esri.com/t5/mapping-questions/only-display-points-if-today-is-monday-through/m-p/65514#M765</guid>
      <dc:creator>DarrenWiens2</dc:creator>
      <dc:date>2017-04-20T21:33:34Z</dc:date>
    </item>
    <item>
      <title>Re: Only display points if today is Monday through Friday.</title>
      <link>https://community.esri.com/t5/mapping-questions/only-display-points-if-today-is-monday-through/m-p/65515#M766</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;If ArcGIS full supported T-SQL we could just do WHERE DATENAME(weekday, DueDate) &amp;lt;&amp;gt; 'Sunday'&amp;nbsp;&lt;/P&gt;&lt;P&gt;or&lt;/P&gt;&lt;P&gt;&lt;SPAN style="color: #ff00ff; font-family: Consolas; font-size: small;"&gt;DATENAME&lt;/SPAN&gt;&lt;SPAN style="color: #808080; font-family: Consolas; font-size: small;"&gt;(&lt;/SPAN&gt;&lt;SPAN style="color: #0000ff; font-family: Consolas; font-size: small;"&gt;weekday&lt;/SPAN&gt;&lt;SPAN style="color: #808080; font-family: Consolas; font-size: small;"&gt;,&lt;/SPAN&gt;&lt;SPAN style="color: #ff00ff; font-family: Consolas; font-size: small;"&gt;GETDATE&lt;/SPAN&gt;&lt;SPAN style="color: #808080; font-family: Consolas; font-size: small;"&gt;())&lt;/SPAN&gt;&lt;SPAN style="font-family: Consolas; font-size: small;"&gt; &lt;/SPAN&gt;&lt;SPAN style="color: #808080; font-family: Consolas; font-size: small;"&gt;=&lt;/SPAN&gt;&lt;SPAN style="font-family: Consolas; font-size: small;"&gt; &lt;/SPAN&gt;&lt;SPAN style="color: #ff0000; font-family: Consolas; font-size: small;"&gt;'Thursday'&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;A href="https://technet.microsoft.com/en-us/library/ms174395(v=sql.105).aspx"&gt;https://technet.microsoft.com/en-us/library/ms174395(v=sql.105).aspx&lt;/A&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;If your data is in a database, I would suggest calculating the Day there and save the result into a new field, then use a method similar to the one described above for mapping.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Thu, 20 Apr 2017 21:37:45 GMT</pubDate>
      <guid>https://community.esri.com/t5/mapping-questions/only-display-points-if-today-is-monday-through/m-p/65515#M766</guid>
      <dc:creator>RichardDaniels</dc:creator>
      <dc:date>2017-04-20T21:37:45Z</dc:date>
    </item>
    <item>
      <title>Re: Only display points if today is Monday through Friday.</title>
      <link>https://community.esri.com/t5/mapping-questions/only-display-points-if-today-is-monday-through/m-p/65516#M767</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;OK so here's what I did...I created a view in my database where there is a record for each office, and fields for the current date, current day of the week, and current time.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Then in my MXD, I joined my office locations layer to this view by Office ID, and in my query, I included in my definition query the following:&amp;nbsp; CurrDayOfWeek &amp;lt;&amp;gt; 'Saturday' and CurrDayOfWeek &amp;lt;&amp;gt; 'Sunday'&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;The view definition was:&lt;/P&gt;&lt;P&gt;SELECT OFFICE_NO, CURRENT_DATE AS CurrDate, TO_CHAR(sysdate, 'DAY') AS CurrDayOfWeek, ((TO_CHAR(CURRENT_TIMESTAMP,'HH12:MI AM'))) AS CurrTime&lt;BR /&gt;FROM SDE.FEATCLASSNAME&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Mon, 24 Apr 2017 16:34:10 GMT</pubDate>
      <guid>https://community.esri.com/t5/mapping-questions/only-display-points-if-today-is-monday-through/m-p/65516#M767</guid>
      <dc:creator>NinaRihn</dc:creator>
      <dc:date>2017-04-24T16:34:10Z</dc:date>
    </item>
  </channel>
</rss>

