<?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: Convert date/time string to date in ArcGIS Dashboards Questions</title>
    <link>https://community.esri.com/t5/arcgis-dashboards-questions/convert-date-time-string-to-date/m-p/1104948#M5212</link>
    <description>&lt;P&gt;what does the current string format look like?&lt;/P&gt;&lt;P&gt;Is the data being updated regularly or can you just do a field calculate on the original data, i.e. select the necessary year, month, day parts from the string and then form a Date object from that?&lt;/P&gt;&lt;LI-CODE lang="c"&gt;return Date(year, month, day)&lt;/LI-CODE&gt;&lt;P&gt;if your data keep changing, you're going to have some fun doing this on the data expression side of things, basically taking the featureSet apart then rebuilding it with a new date field.&amp;nbsp; but we can help you with that i'm sure, although i would say Xander is the guy to go to with these.&lt;/P&gt;</description>
    <pubDate>Tue, 05 Oct 2021 20:05:34 GMT</pubDate>
    <dc:creator>DavidPike</dc:creator>
    <dc:date>2021-10-05T20:05:34Z</dc:date>
    <item>
      <title>Convert date/time string to date</title>
      <link>https://community.esri.com/t5/arcgis-dashboards-questions/convert-date-time-string-to-date/m-p/1104848#M5210</link>
      <description>&lt;P&gt;I'm using a data expression for a pie chart in my dashboard.&amp;nbsp; I could not get the date selector to work to set an filter action, and realized it's because it's seeing my date/time field (created_date) as a string.&amp;nbsp;&amp;nbsp;&lt;BR /&gt;I found this post from 2018 from&amp;nbsp;&lt;a href="https://community.esri.com/t5/user/viewprofilepage/user-id/1108"&gt;@XanderBakker&lt;/a&gt;&amp;nbsp;, listing out every month, etc to parse it out.&amp;nbsp; Is this still necessary or is there a less involved way to get the data part into a date format.&amp;nbsp; I don't need time, just M/D/Y.&lt;/P&gt;&lt;P&gt;&lt;A href="https://community.esri.com/t5/developers-questions/text-to-date-using-arcade-expressions/td-p/523768" target="_blank" rel="noopener"&gt;https://community.esri.com/t5/developers-questions/text-to-date-using-arcade-expressions/td-p/523768&lt;/A&gt;&lt;/P&gt;</description>
      <pubDate>Tue, 05 Oct 2021 16:42:47 GMT</pubDate>
      <guid>https://community.esri.com/t5/arcgis-dashboards-questions/convert-date-time-string-to-date/m-p/1104848#M5210</guid>
      <dc:creator>Anonymous User</dc:creator>
      <dc:date>2021-10-05T16:42:47Z</dc:date>
    </item>
    <item>
      <title>Re: Convert date/time string to date</title>
      <link>https://community.esri.com/t5/arcgis-dashboards-questions/convert-date-time-string-to-date/m-p/1104948#M5212</link>
      <description>&lt;P&gt;what does the current string format look like?&lt;/P&gt;&lt;P&gt;Is the data being updated regularly or can you just do a field calculate on the original data, i.e. select the necessary year, month, day parts from the string and then form a Date object from that?&lt;/P&gt;&lt;LI-CODE lang="c"&gt;return Date(year, month, day)&lt;/LI-CODE&gt;&lt;P&gt;if your data keep changing, you're going to have some fun doing this on the data expression side of things, basically taking the featureSet apart then rebuilding it with a new date field.&amp;nbsp; but we can help you with that i'm sure, although i would say Xander is the guy to go to with these.&lt;/P&gt;</description>
      <pubDate>Tue, 05 Oct 2021 20:05:34 GMT</pubDate>
      <guid>https://community.esri.com/t5/arcgis-dashboards-questions/convert-date-time-string-to-date/m-p/1104948#M5212</guid>
      <dc:creator>DavidPike</dc:creator>
      <dc:date>2021-10-05T20:05:34Z</dc:date>
    </item>
    <item>
      <title>Re: Convert date/time string to date</title>
      <link>https://community.esri.com/t5/arcgis-dashboards-questions/convert-date-time-string-to-date/m-p/1104971#M5213</link>
      <description>&lt;P&gt;&lt;BR /&gt;This is the format: 5/17/2021 10:44 AM&lt;/P&gt;&lt;P&gt;New records are being added daily, but once they are added, the date does not change.&amp;nbsp; So it sounds like from your reply then, there is a simpler way than breaking it all part.&amp;nbsp; I'm newer to Arcade but I'll look at your comment and see if I can figure it out.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Tue, 05 Oct 2021 20:31:54 GMT</pubDate>
      <guid>https://community.esri.com/t5/arcgis-dashboards-questions/convert-date-time-string-to-date/m-p/1104971#M5213</guid>
      <dc:creator>Anonymous User</dc:creator>
      <dc:date>2021-10-05T20:31:54Z</dc:date>
    </item>
    <item>
      <title>Re: Convert date/time string to date</title>
      <link>https://community.esri.com/t5/arcgis-dashboards-questions/convert-date-time-string-to-date/m-p/1104986#M5216</link>
      <description>&lt;P&gt;I don't think so, featureSetByPortalItem() won't respect any on-the-fly arcade expressions you have in something like a web map.&amp;nbsp; I think unless you alter your source data format to a datetime (and alter the current process to ensure you create one) you will have to rebuild from a feature dictionary.&lt;/P&gt;&lt;P&gt;here's a few examples:&lt;/P&gt;&lt;P&gt;&lt;A href="https://doc.arcgis.com/en/dashboards/reference/authoring-data-expressions.htm" target="_blank"&gt;Create effective data expressions—ArcGIS Dashboards | Documentation&lt;/A&gt;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Tue, 05 Oct 2021 21:17:40 GMT</pubDate>
      <guid>https://community.esri.com/t5/arcgis-dashboards-questions/convert-date-time-string-to-date/m-p/1104986#M5216</guid>
      <dc:creator>DavidPike</dc:creator>
      <dc:date>2021-10-05T21:17:40Z</dc:date>
    </item>
    <item>
      <title>Re: Convert date/time string to date</title>
      <link>https://community.esri.com/t5/arcgis-dashboards-questions/convert-date-time-string-to-date/m-p/1104991#M5217</link>
      <description>&lt;P&gt;I'm using the standard editor tracking date field in my hosted layer, so I don't think I have any options on altering the field type.&amp;nbsp; I'm also a little confused on how it's technically a date field, but yet stored as string??&lt;/P&gt;</description>
      <pubDate>Tue, 05 Oct 2021 21:36:21 GMT</pubDate>
      <guid>https://community.esri.com/t5/arcgis-dashboards-questions/convert-date-time-string-to-date/m-p/1104991#M5217</guid>
      <dc:creator>Anonymous User</dc:creator>
      <dc:date>2021-10-05T21:36:21Z</dc:date>
    </item>
    <item>
      <title>Re: Convert date/time string to date</title>
      <link>https://community.esri.com/t5/arcgis-dashboards-questions/convert-date-time-string-to-date/m-p/1104995#M5218</link>
      <description>&lt;P&gt;There are a few reasons why your date field may be stored as a string. The following article talks about some of the different reasons.&amp;nbsp;&lt;/P&gt;&lt;P&gt;&lt;A href="https://doc.arcgis.com/en/arcgis-online/manage-data/work-with-date-fields.htm" target="_self"&gt;Work with Date Fields&lt;/A&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Tue, 05 Oct 2021 21:51:37 GMT</pubDate>
      <guid>https://community.esri.com/t5/arcgis-dashboards-questions/convert-date-time-string-to-date/m-p/1104995#M5218</guid>
      <dc:creator>EmilyMcLeanACTGOV</dc:creator>
      <dc:date>2021-10-05T21:51:37Z</dc:date>
    </item>
    <item>
      <title>Re: Convert date/time string to date</title>
      <link>https://community.esri.com/t5/arcgis-dashboards-questions/convert-date-time-string-to-date/m-p/1137728#M5789</link>
      <description>&lt;P&gt;FYI, I went back to this and someone else had the same problem and a response had the fix.&amp;nbsp; I had to cast my date field as a number, don't know why, but was an easy fix.&amp;nbsp;&amp;nbsp;&lt;BR /&gt;The post that had the fix is here:&amp;nbsp;&lt;/P&gt;&lt;P&gt;&lt;STRONG&gt;&lt;A href="https://community.esri.com/t5/arcgis-dashboards-questions/date-fields-in-data-expressions-for-serial-charts/m-p/1135728#M5761" target="_blank"&gt;https://community.esri.com/t5/arcgis-dashboards-questions/date-fields-in-data-expressions-for-serial-charts/m-p/1135728#M5761&lt;/A&gt;&lt;/STRONG&gt;&lt;/P&gt;</description>
      <pubDate>Thu, 27 Jan 2022 00:03:52 GMT</pubDate>
      <guid>https://community.esri.com/t5/arcgis-dashboards-questions/convert-date-time-string-to-date/m-p/1137728#M5789</guid>
      <dc:creator>Anonymous User</dc:creator>
      <dc:date>2022-01-27T00:03:52Z</dc:date>
    </item>
  </channel>
</rss>

