<?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 Substracting two date fields to calculate age. in ArcGIS Pro Questions</title>
    <link>https://community.esri.com/t5/arcgis-pro-questions/substracting-two-date-fields-to-calculate-age/m-p/26798#M983</link>
    <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hello GIS friends,&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Hope you all are well.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;I have a question. I'm trying to find an arcade expression or sql expression to substract Created_Date field from Current_Date field to get the Age. Is this something that is possible? I will really appreciate your input in helping me with the expression.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Thank you,&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Abi&amp;nbsp;&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
    <pubDate>Thu, 06 Feb 2020 14:26:45 GMT</pubDate>
    <dc:creator>AbiDhakal</dc:creator>
    <dc:date>2020-02-06T14:26:45Z</dc:date>
    <item>
      <title>Substracting two date fields to calculate age.</title>
      <link>https://community.esri.com/t5/arcgis-pro-questions/substracting-two-date-fields-to-calculate-age/m-p/26798#M983</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hello GIS friends,&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Hope you all are well.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;I have a question. I'm trying to find an arcade expression or sql expression to substract Created_Date field from Current_Date field to get the Age. Is this something that is possible? I will really appreciate your input in helping me with the expression.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Thank you,&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Abi&amp;nbsp;&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Thu, 06 Feb 2020 14:26:45 GMT</pubDate>
      <guid>https://community.esri.com/t5/arcgis-pro-questions/substracting-two-date-fields-to-calculate-age/m-p/26798#M983</guid>
      <dc:creator>AbiDhakal</dc:creator>
      <dc:date>2020-02-06T14:26:45Z</dc:date>
    </item>
    <item>
      <title>Re: Substracting two date fields to calculate age.</title>
      <link>https://community.esri.com/t5/arcgis-pro-questions/substracting-two-date-fields-to-calculate-age/m-p/26799#M984</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;&lt;A class="link-titled" href="https://developers.arcgis.com/arcade/function-reference/" title="https://developers.arcgis.com/arcade/function-reference/"&gt;Arcade Function Reference | ArcGIS for Developers&lt;/A&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;There is a whole section on dates/times that will help&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Thu, 06 Feb 2020 14:28:38 GMT</pubDate>
      <guid>https://community.esri.com/t5/arcgis-pro-questions/substracting-two-date-fields-to-calculate-age/m-p/26799#M984</guid>
      <dc:creator>DanPatterson_Retired</dc:creator>
      <dc:date>2020-02-06T14:28:38Z</dc:date>
    </item>
    <item>
      <title>Re: Substracting two date fields to calculate age.</title>
      <link>https://community.esri.com/t5/arcgis-pro-questions/substracting-two-date-fields-to-calculate-age/m-p/26800#M985</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hey Dan,&lt;/P&gt;&lt;P&gt;Thank you for the direction. I tried this expression, but it did not run for me. I probably did not know how to insert the right fields in the expression. Here is the expression:&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;SPAN style="-webkit-text-stroke-width: 0px; ,&amp;amp;quot: ; color: #aa0d91; white-space: pre; font-weight: 400; letter-spacing: normal; text-decoration: none; lucida console&amp;amp;quot: ; consolas&amp;amp;quot: ; font-size: 13.93px; font-style: normal; ,monospace: ; text-transform: none; word-spacing: 0px; font-variant: normal; text-indent: 0px; andale mono&amp;amp;quot: ; font-family: &amp;amp;quot; orphans: 2; monaco&amp;amp;quot: ; text-align: left; "&gt;var&lt;/SPAN&gt;&lt;SPAN style="display: inline !important; float: none; background-color: #f8f8f8; color: #595959; font-family: 'Consolas','Andale Mono','Lucida Console','Monaco',monospace; font-size: 0.87em; font-style: normal; font-variant: normal; font-weight: 400; letter-spacing: normal; orphans: 2; overflow-wrap: normal; text-align: left; text-decoration: none; text-indent: 0px; text-transform: none; -webkit-text-stroke-width: 0px; white-space: pre; word-spacing: 0px;"&gt; startDate = &lt;/SPAN&gt;&lt;SPAN style="-webkit-text-stroke-width: 0px; ,&amp;amp;quot: ; color: #5c2699; white-space: pre; font-weight: 400; letter-spacing: normal; text-decoration: none; lucida console&amp;amp;quot: ; consolas&amp;amp;quot: ; font-size: 13.93px; font-style: normal; ,monospace: ; text-transform: none; word-spacing: 0px; font-variant: normal; text-indent: 0px; andale mono&amp;amp;quot: ; font-family: &amp;amp;quot; orphans: 2; monaco&amp;amp;quot: ; text-align: left; "&gt;Date&lt;/SPAN&gt;&lt;SPAN style="display: inline !important; float: none; background-color: #f8f8f8; color: #595959; font-family: 'Consolas','Andale Mono','Lucida Console','Monaco',monospace; font-size: 0.87em; font-style: normal; font-variant: normal; font-weight: 400; letter-spacing: normal; orphans: 2; overflow-wrap: normal; text-align: left; text-decoration: none; text-indent: 0px; text-transform: none; -webkit-text-stroke-width: 0px; white-space: pre; word-spacing: 0px;"&gt;(&lt;/SPAN&gt;&lt;SPAN style="-webkit-text-stroke-width: 0px; ,&amp;amp;quot: ; color: #1c00cf; white-space: pre; font-weight: 400; letter-spacing: normal; text-decoration: none; lucida console&amp;amp;quot: ; consolas&amp;amp;quot: ; font-size: 13.93px; font-style: normal; ,monospace: ; text-transform: none; word-spacing: 0px; font-variant: normal; text-indent: 0px; andale mono&amp;amp;quot: ; font-family: &amp;amp;quot; orphans: 2; monaco&amp;amp;quot: ; text-align: left; "&gt;$feature&lt;/SPAN&gt;&lt;SPAN style="display: inline !important; float: none; background-color: #f8f8f8; color: #595959; font-family: 'Consolas','Andale Mono','Lucida Console','Monaco',monospace; font-size: 0.87em; font-style: normal; font-variant: normal; font-weight: 400; letter-spacing: normal; orphans: 2; overflow-wrap: normal; text-align: left; text-decoration: none; text-indent: 0px; text-transform: none; -webkit-text-stroke-width: 0px; white-space: pre; word-spacing: 0px;"&gt;.startDateField); &lt;/SPAN&gt;&lt;SPAN style="-webkit-text-stroke-width: 0px; ,&amp;amp;quot: ; color: #aa0d91; white-space: pre; font-weight: 400; letter-spacing: normal; text-decoration: none; lucida console&amp;amp;quot: ; consolas&amp;amp;quot: ; font-size: 13.93px; font-style: normal; ,monospace: ; text-transform: none; word-spacing: 0px; font-variant: normal; text-indent: 0px; andale mono&amp;amp;quot: ; font-family: &amp;amp;quot; orphans: 2; monaco&amp;amp;quot: ; text-align: left; "&gt;var&lt;/SPAN&gt;&lt;SPAN style="display: inline !important; float: none; background-color: #f8f8f8; color: #595959; font-family: 'Consolas','Andale Mono','Lucida Console','Monaco',monospace; font-size: 0.87em; font-style: normal; font-variant: normal; font-weight: 400; letter-spacing: normal; orphans: 2; overflow-wrap: normal; text-align: left; text-decoration: none; text-indent: 0px; text-transform: none; -webkit-text-stroke-width: 0px; white-space: pre; word-spacing: 0px;"&gt; endDate = &lt;/SPAN&gt;&lt;SPAN style="-webkit-text-stroke-width: 0px; ,&amp;amp;quot: ; color: #5c2699; white-space: pre; font-weight: 400; letter-spacing: normal; text-decoration: none; lucida console&amp;amp;quot: ; consolas&amp;amp;quot: ; font-size: 13.93px; font-style: normal; ,monospace: ; text-transform: none; word-spacing: 0px; font-variant: normal; text-indent: 0px; andale mono&amp;amp;quot: ; font-family: &amp;amp;quot; orphans: 2; monaco&amp;amp;quot: ; text-align: left; "&gt;Date&lt;/SPAN&gt;&lt;SPAN style="display: inline !important; float: none; background-color: #f8f8f8; color: #595959; font-family: 'Consolas','Andale Mono','Lucida Console','Monaco',monospace; font-size: 0.87em; font-style: normal; font-variant: normal; font-weight: 400; letter-spacing: normal; orphans: 2; overflow-wrap: normal; text-align: left; text-decoration: none; text-indent: 0px; text-transform: none; -webkit-text-stroke-width: 0px; white-space: pre; word-spacing: 0px;"&gt;(&lt;/SPAN&gt;&lt;SPAN style="-webkit-text-stroke-width: 0px; ,&amp;amp;quot: ; color: #1c00cf; white-space: pre; font-weight: 400; letter-spacing: normal; text-decoration: none; lucida console&amp;amp;quot: ; consolas&amp;amp;quot: ; font-size: 13.93px; font-style: normal; ,monospace: ; text-transform: none; word-spacing: 0px; font-variant: normal; text-indent: 0px; andale mono&amp;amp;quot: ; font-family: &amp;amp;quot; orphans: 2; monaco&amp;amp;quot: ; text-align: left; "&gt;$feature&lt;/SPAN&gt;&lt;SPAN style="display: inline !important; float: none; background-color: #f8f8f8; color: #595959; font-family: 'Consolas','Andale Mono','Lucida Console','Monaco',monospace; font-size: 0.87em; font-style: normal; font-variant: normal; font-weight: 400; letter-spacing: normal; orphans: 2; overflow-wrap: normal; text-align: left; text-decoration: none; text-indent: 0px; text-transform: none; -webkit-text-stroke-width: 0px; white-space: pre; word-spacing: 0px;"&gt;.endDateField); &lt;/SPAN&gt;&lt;SPAN style="-webkit-text-stroke-width: 0px; ,&amp;amp;quot: ; color: #aa0d91; white-space: pre; font-weight: 400; letter-spacing: normal; text-decoration: none; lucida console&amp;amp;quot: ; consolas&amp;amp;quot: ; font-size: 13.93px; font-style: normal; ,monospace: ; text-transform: none; word-spacing: 0px; font-variant: normal; text-indent: 0px; andale mono&amp;amp;quot: ; font-family: &amp;amp;quot; orphans: 2; monaco&amp;amp;quot: ; text-align: left; "&gt;var&lt;/SPAN&gt;&lt;SPAN style="display: inline !important; float: none; background-color: #f8f8f8; color: #595959; font-family: 'Consolas','Andale Mono','Lucida Console','Monaco',monospace; font-size: 0.87em; font-style: normal; font-variant: normal; font-weight: 400; letter-spacing: normal; orphans: 2; overflow-wrap: normal; text-align: left; text-decoration: none; text-indent: 0px; text-transform: none; -webkit-text-stroke-width: 0px; white-space: pre; word-spacing: 0px;"&gt; age = &lt;/SPAN&gt;&lt;SPAN style="-webkit-text-stroke-width: 0px; ,&amp;amp;quot: ; color: #5c2699; white-space: pre; font-weight: 400; letter-spacing: normal; text-decoration: none; lucida console&amp;amp;quot: ; consolas&amp;amp;quot: ; font-size: 13.93px; font-style: normal; ,monospace: ; text-transform: none; word-spacing: 0px; font-variant: normal; text-indent: 0px; andale mono&amp;amp;quot: ; font-family: &amp;amp;quot; orphans: 2; monaco&amp;amp;quot: ; text-align: left; "&gt;DateDiff&lt;/SPAN&gt;&lt;SPAN style="display: inline !important; float: none; background-color: #f8f8f8; color: #595959; font-family: 'Consolas','Andale Mono','Lucida Console','Monaco',monospace; font-size: 0.87em; font-style: normal; font-variant: normal; font-weight: 400; letter-spacing: normal; orphans: 2; overflow-wrap: normal; text-align: left; text-decoration: none; text-indent: 0px; text-transform: none; -webkit-text-stroke-width: 0px; white-space: pre; word-spacing: 0px;"&gt;(endDate, startDate, &lt;/SPAN&gt;&lt;SPAN style="-webkit-text-stroke-width: 0px; ,&amp;amp;quot: ; color: #c41a16; white-space: pre; font-weight: 400; letter-spacing: normal; text-decoration: none; lucida console&amp;amp;quot: ; consolas&amp;amp;quot: ; font-size: 13.93px; font-style: normal; ,monospace: ; text-transform: none; word-spacing: 0px; font-variant: normal; text-indent: 0px; andale mono&amp;amp;quot: ; font-family: &amp;amp;quot; orphans: 2; monaco&amp;amp;quot: ; text-align: left; "&gt;'years'&lt;/SPAN&gt;&lt;SPAN style="display: inline !important; float: none; background-color: #f8f8f8; color: #595959; font-family: 'Consolas','Andale Mono','Lucida Console','Monaco',monospace; font-size: 0.87em; font-style: normal; font-variant: normal; font-weight: 400; letter-spacing: normal; orphans: 2; overflow-wrap: normal; text-align: left; text-decoration: none; text-indent: 0px; text-transform: none; -webkit-text-stroke-width: 0px; white-space: pre; word-spacing: 0px;"&gt;); &lt;/SPAN&gt;&lt;SPAN style="-webkit-text-stroke-width: 0px; ,&amp;amp;quot: ; color: #aa0d91; white-space: pre; font-weight: 400; letter-spacing: normal; text-decoration: none; lucida console&amp;amp;quot: ; consolas&amp;amp;quot: ; font-size: 13.93px; font-style: normal; ,monospace: ; text-transform: none; word-spacing: 0px; font-variant: normal; text-indent: 0px; andale mono&amp;amp;quot: ; font-family: &amp;amp;quot; orphans: 2; monaco&amp;amp;quot: ; text-align: left; "&gt;return&lt;/SPAN&gt;&lt;SPAN style="display: inline !important; float: none; background-color: #f8f8f8; color: #595959; font-family: 'Consolas','Andale Mono','Lucida Console','Monaco',monospace; font-size: 0.87em; font-style: normal; font-variant: normal; font-weight: 400; letter-spacing: normal; orphans: 2; overflow-wrap: normal; text-align: left; text-decoration: none; text-indent: 0px; text-transform: none; -webkit-text-stroke-width: 0px; white-space: pre; word-spacing: 0px;"&gt; age;&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;I only have created_date field and an Age field. I would like the derivation to populate the Age field by substracting current_date which I do not have from created_date.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Thank you.&lt;/P&gt;&lt;P&gt;Abi&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Thu, 06 Feb 2020 14:40:49 GMT</pubDate>
      <guid>https://community.esri.com/t5/arcgis-pro-questions/substracting-two-date-fields-to-calculate-age/m-p/26800#M985</guid>
      <dc:creator>AbiDhakal</dc:creator>
      <dc:date>2020-02-06T14:40:49Z</dc:date>
    </item>
    <item>
      <title>Re: Substracting two date fields to calculate age.</title>
      <link>https://community.esri.com/t5/arcgis-pro-questions/substracting-two-date-fields-to-calculate-age/m-p/26801#M986</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;if you are working in Pro you also have available arcpy.time.EsriTimeDelta()&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Thu, 06 Feb 2020 15:39:47 GMT</pubDate>
      <guid>https://community.esri.com/t5/arcgis-pro-questions/substracting-two-date-fields-to-calculate-age/m-p/26801#M986</guid>
      <dc:creator>BruceHarold</dc:creator>
      <dc:date>2020-02-06T15:39:47Z</dc:date>
    </item>
    <item>
      <title>Re: Substracting two date fields to calculate age.</title>
      <link>https://community.esri.com/t5/arcgis-pro-questions/substracting-two-date-fields-to-calculate-age/m-p/26802#M987</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Abi,&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;You might find some information&amp;nbsp; in this &lt;A _jive_internal="true" href="https://community.esri.com/community/gis/web-gis/arcgisonline/blog/2020/02/04/make-time-aware-popups-with-arcade"&gt;blog article&lt;/A&gt;&amp;nbsp;of use.&amp;nbsp; it shows how to use arcade to show information in a popup window based on hours of operation and current time.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;mark&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Thu, 06 Feb 2020 20:27:51 GMT</pubDate>
      <guid>https://community.esri.com/t5/arcgis-pro-questions/substracting-two-date-fields-to-calculate-age/m-p/26802#M987</guid>
      <dc:creator>MarkBockenhauer</dc:creator>
      <dc:date>2020-02-06T20:27:51Z</dc:date>
    </item>
    <item>
      <title>Re: Substracting two date fields to calculate age.</title>
      <link>https://community.esri.com/t5/arcgis-pro-questions/substracting-two-date-fields-to-calculate-age/m-p/1087239#M44213</link>
      <description>&lt;P&gt;I know this is an older post, but I was successfully able to use your expression to calculate the age in my own data.&amp;nbsp; I seem to have better luck with Arcade when I enclose the field names in brackets and single quotes, but I also am using joined tables so that might be why.&amp;nbsp; For example Date($feature['startDateField']).&lt;/P&gt;</description>
      <pubDate>Mon, 09 Aug 2021 19:40:44 GMT</pubDate>
      <guid>https://community.esri.com/t5/arcgis-pro-questions/substracting-two-date-fields-to-calculate-age/m-p/1087239#M44213</guid>
      <dc:creator>LukeGilner1</dc:creator>
      <dc:date>2021-08-09T19:40:44Z</dc:date>
    </item>
    <item>
      <title>Re: Substracting two date fields to calculate age.</title>
      <link>https://community.esri.com/t5/arcgis-pro-questions/substracting-two-date-fields-to-calculate-age/m-p/1138740#M50736</link>
      <description>&lt;P&gt;Hi&amp;nbsp;&lt;a href="https://community.esri.com/t5/user/viewprofilepage/user-id/1066"&gt;@DanPatterson_Retired&lt;/a&gt;&amp;nbsp;,&lt;/P&gt;&lt;P&gt;Thanks for the link but it only talks about the date/time expressions.&amp;nbsp;&lt;/P&gt;&lt;P&gt;However, how do i get the calculated age to be displayed in the age field in field maps?&lt;/P&gt;&lt;P&gt;Should the data type of the age field be string or number or date even.&lt;/P&gt;&lt;P&gt;Advice from everyone is duly welcome.&lt;/P&gt;</description>
      <pubDate>Sun, 30 Jan 2022 18:10:36 GMT</pubDate>
      <guid>https://community.esri.com/t5/arcgis-pro-questions/substracting-two-date-fields-to-calculate-age/m-p/1138740#M50736</guid>
      <dc:creator>KayManuel</dc:creator>
      <dc:date>2022-01-30T18:10:36Z</dc:date>
    </item>
  </channel>
</rss>

