<?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 Auto Calculate a Date Field in ArcGIS Online Questions</title>
    <link>https://community.esri.com/t5/arcgis-online-questions/auto-calculate-a-date-field/m-p/62708#M2978</link>
    <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;I am trying to automatically calculate a date field. What I would like to do is take a permit date and add 180 days to calculate an expiration date.&amp;nbsp;I added a date field for the final calculation. I open the field calculator and write the expression. The expression verifies correctly but when I calculate the field I get errors. I tried several different calculations to see if any of them would work. Below is an example of a calc I did to extract a date. Again, the expression verified correctly but then this error popped up when I calculated the field.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
    <pubDate>Tue, 13 Nov 2018 20:39:42 GMT</pubDate>
    <dc:creator>Anonymous User</dc:creator>
    <dc:date>2018-11-13T20:39:42Z</dc:date>
    <item>
      <title>Auto Calculate a Date Field</title>
      <link>https://community.esri.com/t5/arcgis-online-questions/auto-calculate-a-date-field/m-p/62708#M2978</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;I am trying to automatically calculate a date field. What I would like to do is take a permit date and add 180 days to calculate an expiration date.&amp;nbsp;I added a date field for the final calculation. I open the field calculator and write the expression. The expression verifies correctly but when I calculate the field I get errors. I tried several different calculations to see if any of them would work. Below is an example of a calc I did to extract a date. Again, the expression verified correctly but then this error popped up when I calculated the field.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Tue, 13 Nov 2018 20:39:42 GMT</pubDate>
      <guid>https://community.esri.com/t5/arcgis-online-questions/auto-calculate-a-date-field/m-p/62708#M2978</guid>
      <dc:creator>Anonymous User</dc:creator>
      <dc:date>2018-11-13T20:39:42Z</dc:date>
    </item>
    <item>
      <title>Re: Auto Calculate a Date Field</title>
      <link>https://community.esri.com/t5/arcgis-online-questions/auto-calculate-a-date-field/m-p/62709#M2979</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;From the error message, it appears you're using the extract function. This function, I believe, returns a number. If you are trying to assign this value to a date field, you'll get a field type mismatch of trying to calculate a number into a date field.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;If your goal is to simply add 180 days to a date in a field and assign it to another field, you can form an expression like this:&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;[PermitDate] + 180&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Under normal circumstances, this would yield a new date 180 days into the future. &lt;STRONG&gt;HOWEVER, THERE IS A BUG&lt;/STRONG&gt;&amp;nbsp;in AGOL with date addition, where it doesn't work. Subtraction, however works. So try this expression&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;[PermitDate] - -180&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Where you subtract negative 180.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Mike&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Thu, 15 Nov 2018 01:13:32 GMT</pubDate>
      <guid>https://community.esri.com/t5/arcgis-online-questions/auto-calculate-a-date-field/m-p/62709#M2979</guid>
      <dc:creator>MikeMinami</dc:creator>
      <dc:date>2018-11-15T01:13:32Z</dc:date>
    </item>
    <item>
      <title>Re: Auto Calculate a Date Field</title>
      <link>https://community.esri.com/t5/arcgis-online-questions/auto-calculate-a-date-field/m-p/62710#M2980</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Thank you Mike. Your suggestion of adding a negative did work in Desktop, but it did not work in ArcGIS online. This still solves my problem with the calculation and works for me.&lt;/P&gt;&lt;P&gt;Veronica&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Thu, 15 Nov 2018 20:13:46 GMT</pubDate>
      <guid>https://community.esri.com/t5/arcgis-online-questions/auto-calculate-a-date-field/m-p/62710#M2980</guid>
      <dc:creator>Anonymous User</dc:creator>
      <dc:date>2018-11-15T20:13:46Z</dc:date>
    </item>
    <item>
      <title>Re: Auto Calculate a Date Field</title>
      <link>https://community.esri.com/t5/arcgis-online-questions/auto-calculate-a-date-field/m-p/62711#M2981</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Regarding the bug in AGOL when calculating a date field, I found that when I turned off the sync setting, a calc operation worked properly.&amp;nbsp; When sync was on, the calc would fail.&lt;/P&gt;&lt;P&gt;&lt;IMG class="image-1 jive-image" src="https://community.esri.com/legacyfs/online/451615_pastedImage_1.png" /&gt;&lt;/P&gt;&lt;P&gt;--Jeff&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Thu, 27 Jun 2019 02:52:08 GMT</pubDate>
      <guid>https://community.esri.com/t5/arcgis-online-questions/auto-calculate-a-date-field/m-p/62711#M2981</guid>
      <dc:creator>GISAdministrator16</dc:creator>
      <dc:date>2019-06-27T02:52:08Z</dc:date>
    </item>
  </channel>
</rss>

