<?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: Date labeled wrong with Arcade in ArcGIS Pro Questions</title>
    <link>https://community.esri.com/t5/arcgis-pro-questions/date-labeled-wrong-with-arcade/m-p/265056#M11641</link>
    <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Doh! Of course that's shorter and cleaner, and works perfectly. I tried something like that initially and must have had the syntax wrong because it failed, so I assumed you had to pull out YYYY, MM, and DD separately. Thanks for the suggestion!&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
    <pubDate>Tue, 19 May 2020 16:27:26 GMT</pubDate>
    <dc:creator>JeremyDavies</dc:creator>
    <dc:date>2020-05-19T16:27:26Z</dc:date>
    <item>
      <title>Date labeled wrong with Arcade</title>
      <link>https://community.esri.com/t5/arcgis-pro-questions/date-labeled-wrong-with-arcade/m-p/265046#M11631</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;I keep losing a day when labeling with Arcade. I have a date field (not text) with manually entered dates, e.g., "5/1/2003". I did not enter any times. If I label it with Python by simply calling the date field, &lt;SPAN style="font-family: 'andale mono', monospace;"&gt;[Date]&lt;/SPAN&gt;, it returns exactly that date and formatting. If I call the field&amp;nbsp;with Arcade,&amp;nbsp;&lt;SPAN&gt;&lt;SPAN style="font-family: 'andale mono', monospace;"&gt;$feature.Date&lt;/SPAN&gt;,&lt;/SPAN&gt; it labels as: "2003-04-30T20:00:00-04:00". I figured out how to format the date:&amp;nbsp;&lt;SPAN style="font-family: 'andale mono', monospace;"&gt;Text($feature.Date,'M/D/Y')‍&lt;/SPAN&gt;, and though it's kind of annoying that that's necessary when using Arcade, I at least get it. But the head-scratcher is why I've lost a day. Note that the labeled date is 2003-04-30 (or 4/30/2003), not 5/1/2003 as it should be. I'm sure it has something to do with the time shift. But the question is, how do I prevent this from happening? Do I have to reformat my data? Seems silly that I should have to do that, but at least I'd know what to do. Or is there a way to leave the data as it is and use Arcade to re-format properly? Thanks!&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Thu, 14 Nov 2019 19:41:16 GMT</pubDate>
      <guid>https://community.esri.com/t5/arcgis-pro-questions/date-labeled-wrong-with-arcade/m-p/265046#M11631</guid>
      <dc:creator>JeffThomasILM</dc:creator>
      <dc:date>2019-11-14T19:41:16Z</dc:date>
    </item>
    <item>
      <title>Re: Date labeled wrong with Arcade</title>
      <link>https://community.esri.com/t5/arcgis-pro-questions/date-labeled-wrong-with-arcade/m-p/265047#M11632</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;I figured out how to use Arcade to add time to mitigate the labeling rollback:&lt;/P&gt;&lt;PRE class="language-javascript line-numbers"&gt;&lt;CODE&gt;&lt;SPAN class="token function"&gt;DateAdd&lt;/SPAN&gt;&lt;SPAN class="punctuation token"&gt;(&lt;/SPAN&gt;$feature&lt;SPAN class="punctuation token"&gt;.&lt;/SPAN&gt;Date&lt;SPAN class="punctuation token"&gt;,&lt;/SPAN&gt;&lt;SPAN class="number token"&gt;6&lt;/SPAN&gt;&lt;SPAN class="punctuation token"&gt;,&lt;/SPAN&gt;&lt;SPAN class="string token"&gt;'hours'&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;/CODE&gt;&lt;/PRE&gt;&lt;P&gt;Not all of my dates had the same time offset; some are 19:00:00-05:00 while&amp;nbsp;some&amp;nbsp;are 20:00:00-04:00. Adding 6 hours overcompensates for either. But who knows; I could encounter a 7 hour offset some day and then my DateAdd of 6 hours wouldn't be enough.&amp;nbsp;Adding too many hours could&amp;nbsp;push the date too far forward... it's not a universal solution. And I'm still left shaking my head that I have to worry about this at all! Still trying to understand Arcade's behavior, if anyone has any insight. Thanks!&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Thu, 14 Nov 2019 20:42:20 GMT</pubDate>
      <guid>https://community.esri.com/t5/arcgis-pro-questions/date-labeled-wrong-with-arcade/m-p/265047#M11632</guid>
      <dc:creator>JeffThomasILM</dc:creator>
      <dc:date>2019-11-14T20:42:20Z</dc:date>
    </item>
    <item>
      <title>Re: Date labeled wrong with Arcade</title>
      <link>https://community.esri.com/t5/arcgis-pro-questions/date-labeled-wrong-with-arcade/m-p/265048#M11633</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Ha, just keeps getting better. Another solution is:&lt;/P&gt;&lt;PRE class="language-javascript line-numbers"&gt;&lt;CODE&gt;&lt;SPAN class="token function"&gt;ToUTC&lt;/SPAN&gt;&lt;SPAN class="punctuation token"&gt;(&lt;/SPAN&gt;$feature&lt;SPAN class="punctuation token"&gt;.&lt;/SPAN&gt;Date&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;/CODE&gt;&lt;/PRE&gt;&lt;P&gt;That's a universal solution. Still wish Arcade didn't default to crazy formatting. And&amp;nbsp;doesn't really answer the question: How do I stop Arcade (and other ArcGIS functions?) from time shifting my dates? Apparently it knows (or thinks it knows) what timezone I'm in? Why would I ever want my labels to be unexpectedly different from the actual data?! I understand it's great that ArcGIS can calculate things for labels or field calculations, but I don't understand why anything but a straight transfer of field values would be the &lt;EM&gt;default&lt;/EM&gt;.&amp;nbsp;Other side of the coin, perhaps this is an issue with the way date/time is stored and displayed in the attribute table.&amp;nbsp;&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Thu, 14 Nov 2019 20:51:43 GMT</pubDate>
      <guid>https://community.esri.com/t5/arcgis-pro-questions/date-labeled-wrong-with-arcade/m-p/265048#M11633</guid>
      <dc:creator>JeffThomasILM</dc:creator>
      <dc:date>2019-11-14T20:51:43Z</dc:date>
    </item>
    <item>
      <title>Re: Date labeled wrong with Arcade</title>
      <link>https://community.esri.com/t5/arcgis-pro-questions/date-labeled-wrong-with-arcade/m-p/265049#M11634</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;A little background about dates in ArcGIS Online in this recent 2 minute video:&lt;/P&gt;&lt;P&gt;&lt;A href="https://www.youtube.com/watch?v=v3kh_6PZEg0&amp;amp;feature=youtu.be"&gt;https://www.youtube.com/watch?v=v3kh_6PZEg0&amp;amp;feature=youtu.be&lt;/A&gt;&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Fri, 15 Nov 2019 15:44:25 GMT</pubDate>
      <guid>https://community.esri.com/t5/arcgis-pro-questions/date-labeled-wrong-with-arcade/m-p/265049#M11634</guid>
      <dc:creator>XanderBakker</dc:creator>
      <dc:date>2019-11-15T15:44:25Z</dc:date>
    </item>
    <item>
      <title>Re: Date labeled wrong with Arcade</title>
      <link>https://community.esri.com/t5/arcgis-pro-questions/date-labeled-wrong-with-arcade/m-p/265050#M11635</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Thanks for the link, Xander. Let me see if I understand. If Arc is populating a date field itself (e.g., editor tracking), it fills in the time it happened in UTC along with the offset of the time zone (it thinks) I'm located in. When that date/time is retrieved (e.g., labeling), it shows me the correct local date/time. But if I'm filling in dates manually without specifying time, Pro automatically assumes the time is 00:00:00 UTC, then subtracts (since I'm west of PM) my local time. This will always result in the prior date being retrieved/displayed.&amp;nbsp;Is there a way to prevent that from happening? Basically, tell Arc to disregard time and/or time zone, and simply show the date as is?&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Fri, 15 Nov 2019 16:09:40 GMT</pubDate>
      <guid>https://community.esri.com/t5/arcgis-pro-questions/date-labeled-wrong-with-arcade/m-p/265050#M11635</guid>
      <dc:creator>JeffThomasILM</dc:creator>
      <dc:date>2019-11-15T16:09:40Z</dc:date>
    </item>
    <item>
      <title>Re: Date labeled wrong with Arcade</title>
      <link>https://community.esri.com/t5/arcgis-pro-questions/date-labeled-wrong-with-arcade/m-p/265051#M11636</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hi&amp;nbsp;&lt;A href="https://community.esri.com/migrated-users/193614"&gt;Jeff Thomas&lt;/A&gt;&amp;nbsp;,&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;That is a good question. I can imagine that there should be some way to configure the time zone in which you will enter and visualize your data in ArcGIS Pro.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;A href="https://community.esri.com/people/KKramer-esristaff"&gt;KKramer-esristaff&lt;/A&gt;&amp;nbsp;, any suggestions?&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Fri, 15 Nov 2019 21:59:32 GMT</pubDate>
      <guid>https://community.esri.com/t5/arcgis-pro-questions/date-labeled-wrong-with-arcade/m-p/265051#M11636</guid>
      <dc:creator>XanderBakker</dc:creator>
      <dc:date>2019-11-15T21:59:32Z</dc:date>
    </item>
    <item>
      <title>Re: Date labeled wrong with Arcade</title>
      <link>https://community.esri.com/t5/arcgis-pro-questions/date-labeled-wrong-with-arcade/m-p/265052#M11637</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hey Jeff-- did you ever find a solution this issue of arcade shifting the day? It's driving me crazy! I tried changing the time zone on the Time tab, but that had no affect.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Mon, 18 May 2020 19:01:49 GMT</pubDate>
      <guid>https://community.esri.com/t5/arcgis-pro-questions/date-labeled-wrong-with-arcade/m-p/265052#M11637</guid>
      <dc:creator>JeremyDavies</dc:creator>
      <dc:date>2020-05-18T19:01:49Z</dc:date>
    </item>
    <item>
      <title>Re: Date labeled wrong with Arcade</title>
      <link>https://community.esri.com/t5/arcgis-pro-questions/date-labeled-wrong-with-arcade/m-p/265053#M11638</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hi,&amp;nbsp;&lt;A href="https://community.esri.com/migrated-users/19030"&gt;Jeremy&lt;/A&gt;. The answer is yes and no. Insofar as getting it to label correctly, that can be accomplished (at least for my situation) with the &lt;SPAN style="font-family: 'courier new', courier, monospace;"&gt;&lt;A href="https://developers.arcgis.com/arcade/function-reference/date_functions/#toutc"&gt;ToUTC()&lt;/A&gt;&lt;/SPAN&gt; Arcade date function:&lt;/P&gt;&lt;PRE class="language-javascript line-numbers" style="color: #000000; background: #f5f2f0; border: 0px; margin: 0.5em 0px; padding: 1em 1em 1em 3.8em;"&gt;&lt;CODE&gt;&lt;SPAN class="token function"&gt;ToUTC&lt;/SPAN&gt;&lt;SPAN class="punctuation token"&gt;(&lt;/SPAN&gt;$feature&lt;SPAN class="punctuation token"&gt;.&lt;/SPAN&gt;Date&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;/CODE&gt;&lt;/PRE&gt;&lt;P&gt;You might be facing any number of different issues; one of Arcade's date functions can probably do what you need. As for&amp;nbsp;preventing the time shift to begin with, that's more complicated. You and I are hardly the first people to be frustrated with Arc's date-time behavior. Esri creates global solutions, which sometimes complicates what should be simple&amp;nbsp;local issues (like what time it is?!). This thread provides some more insight:&amp;nbsp;&lt;A href="https://community.esri.com/thread/180276"&gt;ArcGIS Online Time Zone - Over-ride UTC default?&lt;/A&gt;&amp;nbsp;I hope you're able to find an acceptable solution!&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Mon, 18 May 2020 22:35:28 GMT</pubDate>
      <guid>https://community.esri.com/t5/arcgis-pro-questions/date-labeled-wrong-with-arcade/m-p/265053#M11638</guid>
      <dc:creator>JeffThomasILM</dc:creator>
      <dc:date>2020-05-18T22:35:28Z</dc:date>
    </item>
    <item>
      <title>Re: Date labeled wrong with Arcade</title>
      <link>https://community.esri.com/t5/arcgis-pro-questions/date-labeled-wrong-with-arcade/m-p/265054#M11639</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Thanks for the link-- I'll read it see where it takes me! For now I am using 'ToUTC' via&amp;nbsp;Arcade in the formula below, and it produces the correct day. If I learn anything more on this topic, I'll sure to share. In the meantime, your tip was a game changer for me- thanks!&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;PRE class="language-none line-numbers"&gt;&lt;CODE&gt;YMD_Text =&amp;nbsp;Text(ToUTC($feature.DateTimeStamp),'YYYY') + Text(ToUTC($feature.DateTimeStamp),'MM') + Text(ToUTC($feature.DateTimeStamp),'DD')&lt;SPAN class="line-numbers-rows"&gt;&lt;SPAN&gt;‍&lt;/SPAN&gt;&lt;/SPAN&gt;&lt;/CODE&gt;&lt;/PRE&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Mon, 18 May 2020 23:22:57 GMT</pubDate>
      <guid>https://community.esri.com/t5/arcgis-pro-questions/date-labeled-wrong-with-arcade/m-p/265054#M11639</guid>
      <dc:creator>JeremyDavies</dc:creator>
      <dc:date>2020-05-18T23:22:57Z</dc:date>
    </item>
    <item>
      <title>Re: Date labeled wrong with Arcade</title>
      <link>https://community.esri.com/t5/arcgis-pro-questions/date-labeled-wrong-with-arcade/m-p/265055#M11640</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hi&amp;nbsp;&lt;A href="https://community.esri.com/people/jrdavies"&gt;jrdavies&lt;/A&gt;&amp;nbsp;,&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Wouldn't it be shorter to use this:&lt;/P&gt;&lt;PRE class="language-javascript line-numbers"&gt;&lt;CODE&gt;MD_Text &lt;SPAN class="operator token"&gt;=&lt;/SPAN&gt; &lt;SPAN class="token function"&gt;Text&lt;/SPAN&gt;&lt;SPAN class="punctuation token"&gt;(&lt;/SPAN&gt;&lt;SPAN class="token function"&gt;ToUTC&lt;/SPAN&gt;&lt;SPAN class="punctuation token"&gt;(&lt;/SPAN&gt;$feature&lt;SPAN class="punctuation token"&gt;.&lt;/SPAN&gt;DateTimeStamp&lt;SPAN class="punctuation token"&gt;)&lt;/SPAN&gt;&lt;SPAN class="punctuation token"&gt;,&lt;/SPAN&gt;&lt;SPAN class="string token"&gt;'YYYYMMDD'&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;/CODE&gt;&lt;/PRE&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Tue, 19 May 2020 13:42:53 GMT</pubDate>
      <guid>https://community.esri.com/t5/arcgis-pro-questions/date-labeled-wrong-with-arcade/m-p/265055#M11640</guid>
      <dc:creator>XanderBakker</dc:creator>
      <dc:date>2020-05-19T13:42:53Z</dc:date>
    </item>
    <item>
      <title>Re: Date labeled wrong with Arcade</title>
      <link>https://community.esri.com/t5/arcgis-pro-questions/date-labeled-wrong-with-arcade/m-p/265056#M11641</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Doh! Of course that's shorter and cleaner, and works perfectly. I tried something like that initially and must have had the syntax wrong because it failed, so I assumed you had to pull out YYYY, MM, and DD separately. Thanks for the suggestion!&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Tue, 19 May 2020 16:27:26 GMT</pubDate>
      <guid>https://community.esri.com/t5/arcgis-pro-questions/date-labeled-wrong-with-arcade/m-p/265056#M11641</guid>
      <dc:creator>JeremyDavies</dc:creator>
      <dc:date>2020-05-19T16:27:26Z</dc:date>
    </item>
    <item>
      <title>Re: Date labeled wrong with Arcade</title>
      <link>https://community.esri.com/t5/arcgis-pro-questions/date-labeled-wrong-with-arcade/m-p/1082212#M43668</link>
      <description>&lt;P&gt;One thing to note as well...&amp;nbsp; If you only put in a Date, the timestamp is set 00:00:00 UTC.&amp;nbsp; Everytime zone West of Longitude 0 degrees will subtract an hour for each time zone, so the American continents will subtract time from midnight, making the day one day earlier.&amp;nbsp; I feel that ESRI should make strides to eliminate this throughout their products, since they recommend that you use UTC as your database time zone.&lt;/P&gt;</description>
      <pubDate>Fri, 23 Jul 2021 15:30:28 GMT</pubDate>
      <guid>https://community.esri.com/t5/arcgis-pro-questions/date-labeled-wrong-with-arcade/m-p/1082212#M43668</guid>
      <dc:creator>bsanders69</dc:creator>
      <dc:date>2021-07-23T15:30:28Z</dc:date>
    </item>
  </channel>
</rss>

