<?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: How do I label date attributes in a different format? in Data Management Questions</title>
    <link>https://community.esri.com/t5/data-management-questions/how-do-i-label-date-attributes-in-a-different/m-p/445484#M25464</link>
    <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Randy,&lt;/P&gt;&lt;P&gt;Thank you SO much!&amp;nbsp;&amp;nbsp; (FYI I am using ArcGIS Pro.)&amp;nbsp;&amp;nbsp; This was pretty much exactly what I needed!&amp;nbsp;&amp;nbsp; I only needed to edit two things, but this was the final leg I needed to get it working correctly!&amp;nbsp;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;In case you were wondering, I had two fields I wanted displayed (a project name and start date) so I added "[proj_name] + '\n' +" before the ds.strftime (%b %y) expression.&amp;nbsp; And my time attribute apparently ONLY has mm/dd/yyyy so it errored-out until I removed the timegroup and timezone from the strptime function.&amp;nbsp;&amp;nbsp;&amp;nbsp; (Also as above, I only wanted the mmm and yy, so I made the minor change to the strftime function.&amp;nbsp;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;This was really wracking my brain.&amp;nbsp;&amp;nbsp; Thanks again!&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Dale&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
    <pubDate>Thu, 23 Jan 2020 22:12:05 GMT</pubDate>
    <dc:creator>DaleArnold</dc:creator>
    <dc:date>2020-01-23T22:12:05Z</dc:date>
    <item>
      <title>How do I label date attributes in a different format?</title>
      <link>https://community.esri.com/t5/data-management-questions/how-do-i-label-date-attributes-in-a-different/m-p/445482#M25462</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;I have an attribute I would like to label on my map that has dates in mm/dd/yyyy format.&amp;nbsp;&amp;nbsp; When I label the map, it displays in that format (as one would expect).&amp;nbsp;&amp;nbsp; I want to draw the labels in a different format, specifically mmm yyyy or mmm yy format.&amp;nbsp;&amp;nbsp; I can get a dynamic text box to update with the date on the map, but I want a map to populate with project dates over the features.&amp;nbsp;&amp;nbsp; Thanks in advance!&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Wed, 22 Jan 2020 00:18:17 GMT</pubDate>
      <guid>https://community.esri.com/t5/data-management-questions/how-do-i-label-date-attributes-in-a-different/m-p/445482#M25462</guid>
      <dc:creator>DaleArnold</dc:creator>
      <dc:date>2020-01-22T00:18:17Z</dc:date>
    </item>
    <item>
      <title>Re: How do I label date attributes in a different format?</title>
      <link>https://community.esri.com/t5/data-management-questions/how-do-i-label-date-attributes-in-a-different/m-p/445483#M25463</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;What are you working with - Desktop 10.x, Pro, AGOL ?&amp;nbsp; With Desktop for example, the label manager allows for creating an expression.&amp;nbsp; Python&amp;nbsp; code would be something like (note: advanced checked):&lt;/P&gt;&lt;PRE class="lia-code-sample line-numbers language-none"&gt;&lt;CODE&gt;&lt;SPAN class="keyword token"&gt;from&lt;/SPAN&gt; datetime &lt;SPAN class="keyword token"&gt;import&lt;/SPAN&gt; datetime

&lt;SPAN class="keyword token"&gt;def&lt;/SPAN&gt; FindLabel &lt;SPAN class="punctuation token"&gt;(&lt;/SPAN&gt; &lt;SPAN class="punctuation token"&gt;[&lt;/SPAN&gt;EditDate&lt;SPAN class="punctuation token"&gt;]&lt;/SPAN&gt; &lt;SPAN class="punctuation token"&gt;)&lt;/SPAN&gt;&lt;SPAN class="punctuation token"&gt;:&lt;/SPAN&gt;
  ds &lt;SPAN class="operator token"&gt;=&lt;/SPAN&gt; datetime&lt;SPAN class="punctuation token"&gt;.&lt;/SPAN&gt;strptime&lt;SPAN class="punctuation token"&gt;(&lt;/SPAN&gt;&lt;SPAN class="punctuation token"&gt;[&lt;/SPAN&gt;EditDate&lt;SPAN class="punctuation token"&gt;]&lt;/SPAN&gt;&lt;SPAN class="punctuation token"&gt;,&lt;/SPAN&gt; &lt;SPAN class="string token"&gt;'%m/%d/%Y %H:%M:%S %p'&lt;/SPAN&gt;&lt;SPAN class="punctuation token"&gt;)&lt;/SPAN&gt;
  &lt;SPAN class="keyword token"&gt;return&lt;/SPAN&gt; ds&lt;SPAN class="punctuation token"&gt;.&lt;/SPAN&gt;strftime&lt;SPAN class="punctuation token"&gt;(&lt;/SPAN&gt;&lt;SPAN class="string token"&gt;"%B %Y"&lt;/SPAN&gt;&lt;SPAN class="punctuation token"&gt;)&lt;/SPAN&gt;&lt;SPAN class="line-numbers-rows"&gt;&lt;SPAN&gt;‍&lt;/SPAN&gt;&lt;SPAN&gt;‍&lt;/SPAN&gt;&lt;SPAN&gt;‍&lt;/SPAN&gt;&lt;SPAN&gt;‍&lt;/SPAN&gt;&lt;SPAN&gt;‍&lt;/SPAN&gt;&lt;/SPAN&gt;&lt;/CODE&gt;&lt;/PRE&gt;&lt;P&gt;&lt;IMG alt="Label Manager" class="jive-emoji image-1 jive-image j-img-original" src="https://community.esri.com/legacyfs/online/479048_label.png" /&gt;&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Sat, 11 Dec 2021 19:54:24 GMT</pubDate>
      <guid>https://community.esri.com/t5/data-management-questions/how-do-i-label-date-attributes-in-a-different/m-p/445483#M25463</guid>
      <dc:creator>RandyBurton</dc:creator>
      <dc:date>2021-12-11T19:54:24Z</dc:date>
    </item>
    <item>
      <title>Re: How do I label date attributes in a different format?</title>
      <link>https://community.esri.com/t5/data-management-questions/how-do-i-label-date-attributes-in-a-different/m-p/445484#M25464</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Randy,&lt;/P&gt;&lt;P&gt;Thank you SO much!&amp;nbsp;&amp;nbsp; (FYI I am using ArcGIS Pro.)&amp;nbsp;&amp;nbsp; This was pretty much exactly what I needed!&amp;nbsp;&amp;nbsp; I only needed to edit two things, but this was the final leg I needed to get it working correctly!&amp;nbsp;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;In case you were wondering, I had two fields I wanted displayed (a project name and start date) so I added "[proj_name] + '\n' +" before the ds.strftime (%b %y) expression.&amp;nbsp; And my time attribute apparently ONLY has mm/dd/yyyy so it errored-out until I removed the timegroup and timezone from the strptime function.&amp;nbsp;&amp;nbsp;&amp;nbsp; (Also as above, I only wanted the mmm and yy, so I made the minor change to the strftime function.&amp;nbsp;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;This was really wracking my brain.&amp;nbsp;&amp;nbsp; Thanks again!&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Dale&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Thu, 23 Jan 2020 22:12:05 GMT</pubDate>
      <guid>https://community.esri.com/t5/data-management-questions/how-do-i-label-date-attributes-in-a-different/m-p/445484#M25464</guid>
      <dc:creator>DaleArnold</dc:creator>
      <dc:date>2020-01-23T22:12:05Z</dc:date>
    </item>
  </channel>
</rss>

