<?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 Date.now() for esriFieldTypeDate? in ArcGIS JavaScript Maps SDK Questions</title>
    <link>https://community.esri.com/t5/arcgis-javascript-maps-sdk-questions/date-now-for-esrifieldtypedate/m-p/709706#M66004</link>
    <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Based on &lt;A href="https://community.esri.com/migrated-users/3101"&gt;Robert Scheitlin, GISP&lt;/A&gt;‌'s &lt;A _jive_internal="true" href="https://community.esri.com/thread/176125"&gt;answer&lt;/A&gt;, I have been trying to set a date attribute programmatically using the following expression:&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;PRE class="language-javascript line-numbers"&gt;&lt;CODE&gt;evt&lt;SPAN class="punctuation token"&gt;.&lt;/SPAN&gt;adds&lt;SPAN class="punctuation token"&gt;[&lt;/SPAN&gt;&lt;SPAN class="number token"&gt;0&lt;/SPAN&gt;&lt;SPAN class="punctuation token"&gt;]&lt;/SPAN&gt;&lt;SPAN class="punctuation token"&gt;.&lt;/SPAN&gt;attributes&lt;SPAN class="punctuation token"&gt;.&lt;/SPAN&gt;eventdate &lt;SPAN class="operator token"&gt;=&lt;/SPAN&gt; &lt;SPAN class="keyword token"&gt;new&lt;/SPAN&gt; &lt;SPAN class="token class-name"&gt;Date&lt;/SPAN&gt;&lt;SPAN class="punctuation token"&gt;(&lt;/SPAN&gt;Date&lt;SPAN class="punctuation token"&gt;.&lt;/SPAN&gt;&lt;SPAN class="token function"&gt;now&lt;/SPAN&gt;&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;&lt;SPAN class="punctuation token"&gt;;&lt;/SPAN&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; ‍&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;&lt;/P&gt;&lt;P&gt;This generates the following error: "Error: Unable to complete operation"&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;However, if I try to&amp;nbsp;set the value of a text field it works fine, e.g.:&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;PRE class="language-javascript line-numbers"&gt;&lt;CODE&gt;evt&lt;SPAN class="punctuation token"&gt;.&lt;/SPAN&gt;adds&lt;SPAN class="punctuation token"&gt;[&lt;/SPAN&gt;&lt;SPAN class="number token"&gt;0&lt;/SPAN&gt;&lt;SPAN class="punctuation token"&gt;]&lt;/SPAN&gt;&lt;SPAN class="punctuation token"&gt;.&lt;/SPAN&gt;attributes&lt;SPAN class="punctuation token"&gt;.&lt;/SPAN&gt;description &lt;SPAN class="operator token"&gt;=&lt;/SPAN&gt; &lt;SPAN class="string token"&gt;"test"&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;&lt;/P&gt;&lt;P&gt;So I suppose the problem has to do with the field type. How can this be resolved?&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Here is my &lt;A href="https://jsfiddle.net/ugowr8er/"&gt;entire code&lt;/A&gt; for reference. Thanks&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
    <pubDate>Fri, 17 Feb 2017 21:39:33 GMT</pubDate>
    <dc:creator>NaciDilekli</dc:creator>
    <dc:date>2017-02-17T21:39:33Z</dc:date>
    <item>
      <title>Date.now() for esriFieldTypeDate?</title>
      <link>https://community.esri.com/t5/arcgis-javascript-maps-sdk-questions/date-now-for-esrifieldtypedate/m-p/709706#M66004</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Based on &lt;A href="https://community.esri.com/migrated-users/3101"&gt;Robert Scheitlin, GISP&lt;/A&gt;‌'s &lt;A _jive_internal="true" href="https://community.esri.com/thread/176125"&gt;answer&lt;/A&gt;, I have been trying to set a date attribute programmatically using the following expression:&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;PRE class="language-javascript line-numbers"&gt;&lt;CODE&gt;evt&lt;SPAN class="punctuation token"&gt;.&lt;/SPAN&gt;adds&lt;SPAN class="punctuation token"&gt;[&lt;/SPAN&gt;&lt;SPAN class="number token"&gt;0&lt;/SPAN&gt;&lt;SPAN class="punctuation token"&gt;]&lt;/SPAN&gt;&lt;SPAN class="punctuation token"&gt;.&lt;/SPAN&gt;attributes&lt;SPAN class="punctuation token"&gt;.&lt;/SPAN&gt;eventdate &lt;SPAN class="operator token"&gt;=&lt;/SPAN&gt; &lt;SPAN class="keyword token"&gt;new&lt;/SPAN&gt; &lt;SPAN class="token class-name"&gt;Date&lt;/SPAN&gt;&lt;SPAN class="punctuation token"&gt;(&lt;/SPAN&gt;Date&lt;SPAN class="punctuation token"&gt;.&lt;/SPAN&gt;&lt;SPAN class="token function"&gt;now&lt;/SPAN&gt;&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;&lt;SPAN class="punctuation token"&gt;;&lt;/SPAN&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; ‍&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;&lt;/P&gt;&lt;P&gt;This generates the following error: "Error: Unable to complete operation"&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;However, if I try to&amp;nbsp;set the value of a text field it works fine, e.g.:&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;PRE class="language-javascript line-numbers"&gt;&lt;CODE&gt;evt&lt;SPAN class="punctuation token"&gt;.&lt;/SPAN&gt;adds&lt;SPAN class="punctuation token"&gt;[&lt;/SPAN&gt;&lt;SPAN class="number token"&gt;0&lt;/SPAN&gt;&lt;SPAN class="punctuation token"&gt;]&lt;/SPAN&gt;&lt;SPAN class="punctuation token"&gt;.&lt;/SPAN&gt;attributes&lt;SPAN class="punctuation token"&gt;.&lt;/SPAN&gt;description &lt;SPAN class="operator token"&gt;=&lt;/SPAN&gt; &lt;SPAN class="string token"&gt;"test"&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;&lt;/P&gt;&lt;P&gt;So I suppose the problem has to do with the field type. How can this be resolved?&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Here is my &lt;A href="https://jsfiddle.net/ugowr8er/"&gt;entire code&lt;/A&gt; for reference. Thanks&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Fri, 17 Feb 2017 21:39:33 GMT</pubDate>
      <guid>https://community.esri.com/t5/arcgis-javascript-maps-sdk-questions/date-now-for-esrifieldtypedate/m-p/709706#M66004</guid>
      <dc:creator>NaciDilekli</dc:creator>
      <dc:date>2017-02-17T21:39:33Z</dc:date>
    </item>
    <item>
      <title>Re: Date.now() for esriFieldTypeDate?</title>
      <link>https://community.esri.com/t5/arcgis-javascript-maps-sdk-questions/date-now-for-esrifieldtypedate/m-p/709707#M66005</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Naci,&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&amp;nbsp; What is the field type for your eventdate field?&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Fri, 17 Feb 2017 21:48:16 GMT</pubDate>
      <guid>https://community.esri.com/t5/arcgis-javascript-maps-sdk-questions/date-now-for-esrifieldtypedate/m-p/709707#M66005</guid>
      <dc:creator>RobertScheitlin__GISP</dc:creator>
      <dc:date>2017-02-17T21:48:16Z</dc:date>
    </item>
    <item>
      <title>Re: Date.now() for esriFieldTypeDate?</title>
      <link>https://community.esri.com/t5/arcgis-javascript-maps-sdk-questions/date-now-for-esrifieldtypedate/m-p/709708#M66006</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Robert,&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;It is&amp;nbsp;&lt;EM style="color: #000000; background-color: #ffffff;"&gt;esriFieldTypeDate.&amp;nbsp;&lt;/EM&gt;Here is the full information of the field: "eventdate &lt;EM&gt;( type: esriFieldTypeDate , alias: Date , editable: true , nullable: true , length: 8 )"&lt;/EM&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;This is the service I am using:&amp;nbsp;&lt;A class="link-titled" href="https://sampleserver6.arcgisonline.com/arcgis/rest/services/Wildfire/FeatureServer/0" title="https://sampleserver6.arcgisonline.com/arcgis/rest/services/Wildfire/FeatureServer/0"&gt;Layer: Wildfire Response Points (ID: 0)&lt;/A&gt;&amp;nbsp;&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Fri, 17 Feb 2017 21:52:11 GMT</pubDate>
      <guid>https://community.esri.com/t5/arcgis-javascript-maps-sdk-questions/date-now-for-esrifieldtypedate/m-p/709708#M66006</guid>
      <dc:creator>NaciDilekli</dc:creator>
      <dc:date>2017-02-17T21:52:11Z</dc:date>
    </item>
    <item>
      <title>Re: Date.now() for esriFieldTypeDate?</title>
      <link>https://community.esri.com/t5/arcgis-javascript-maps-sdk-questions/date-now-for-esrifieldtypedate/m-p/709709#M66007</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Naci,&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Try:&lt;/P&gt;&lt;PRE class="" style="color: #000000; background: #f5f2f0; border: 0px; font-size: 14px; margin: 0.5em 0px; padding: 1em 1em 1em 3.8em;"&gt;&lt;CODE style="border: 0px; font-weight: inherit; font-size: 14px;"&gt;evt&lt;SPAN class="" style="color: #999999; border: 0px; font-weight: inherit; font-size: 14px;"&gt;.&lt;/SPAN&gt;adds&lt;SPAN class="" style="color: #999999; border: 0px; font-weight: inherit; font-size: 14px;"&gt;[&lt;/SPAN&gt;&lt;SPAN class="" style="color: #990000; border: 0px; font-weight: inherit; font-size: 14px;"&gt;0&lt;/SPAN&gt;&lt;SPAN class="" style="color: #999999; border: 0px; font-weight: inherit; font-size: 14px;"&gt;]&lt;/SPAN&gt;&lt;SPAN class="" style="color: #999999; border: 0px; font-weight: inherit; font-size: 14px;"&gt;.&lt;/SPAN&gt;attributes&lt;SPAN class="" style="color: #999999; border: 0px; font-weight: inherit; font-size: 14px;"&gt;.&lt;/SPAN&gt;eventdate &lt;SPAN class="" style="color: #a67f59; background: rgba(255, 255, 255, 0.498039); border: 0px; font-weight: inherit; font-size: 14px;"&gt;=&lt;/SPAN&gt; &lt;SPAN class="" style="color: #0077aa; border: 0px; font-weight: inherit; font-size: 14px;"&gt;new&lt;/SPAN&gt; &lt;SPAN class="" style="border: 0px; font-weight: inherit; font-size: 14px;"&gt;Date&lt;/SPAN&gt;&lt;SPAN class="" style="color: #999999; border: 0px; font-weight: inherit; font-size: 14px;"&gt;(&lt;/SPAN&gt;Date&lt;SPAN class="" style="color: #999999; border: 0px; font-weight: inherit; font-size: 14px;"&gt;.&lt;/SPAN&gt;&lt;SPAN class="" style="color: #d74444; border: 0px; font-weight: inherit; font-size: 14px;"&gt;now&lt;/SPAN&gt;&lt;SPAN class="" style="color: #999999; border: 0px; font-weight: inherit; font-size: 14px;"&gt;(&lt;/SPAN&gt;&lt;SPAN class="" style="color: #999999; border: 0px; font-weight: inherit; font-size: 14px;"&gt;)&lt;/SPAN&gt;&lt;SPAN class="" style="color: #999999; border: 0px; font-weight: inherit; font-size: 14px;"&gt;).getTime()&lt;/SPAN&gt;&lt;SPAN class="" style="color: #999999; border: 0px; font-weight: inherit; font-size: 14px;"&gt;;&lt;/SPAN&gt;&lt;/CODE&gt;&lt;/PRE&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Fri, 17 Feb 2017 22:10:05 GMT</pubDate>
      <guid>https://community.esri.com/t5/arcgis-javascript-maps-sdk-questions/date-now-for-esrifieldtypedate/m-p/709709#M66007</guid>
      <dc:creator>RobertScheitlin__GISP</dc:creator>
      <dc:date>2017-02-17T22:10:05Z</dc:date>
    </item>
    <item>
      <title>Re: Date.now() for esriFieldTypeDate?</title>
      <link>https://community.esri.com/t5/arcgis-javascript-maps-sdk-questions/date-now-for-esrifieldtypedate/m-p/709710#M66008</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Awesome, thanks!&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Fri, 17 Feb 2017 22:12:11 GMT</pubDate>
      <guid>https://community.esri.com/t5/arcgis-javascript-maps-sdk-questions/date-now-for-esrifieldtypedate/m-p/709710#M66008</guid>
      <dc:creator>NaciDilekli</dc:creator>
      <dc:date>2017-02-17T22:12:11Z</dc:date>
    </item>
  </channel>
</rss>

