<?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: What format of date to send in json in addFeature rest interface in ArcGIS JavaScript Maps SDK Questions</title>
    <link>https://community.esri.com/t5/arcgis-javascript-maps-sdk-questions/what-format-of-date-to-send-in-json-in-addfeature/m-p/650060#M60628</link>
    <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;SPAN&gt;it seems to be deducting one hour or so..will investigate out later further.&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;Thank you!&lt;/SPAN&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
    <pubDate>Wed, 06 Feb 2013 12:42:03 GMT</pubDate>
    <dc:creator>MatejSkerjanc</dc:creator>
    <dc:date>2013-02-06T12:42:03Z</dc:date>
    <item>
      <title>What format of date to send in json in addFeature rest interface</title>
      <link>https://community.esri.com/t5/arcgis-javascript-maps-sdk-questions/what-format-of-date-to-send-in-json-in-addfeature/m-p/650056#M60624</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;SPAN&gt;i'm sending all kind's of dates &lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;1970-01-01 06:10:20.0000000 and it fails,...actually all but dot delimited date fail. For instance 1999.1.1. works but the result date in the database is always 1970-01-01 0x:xx:xx.0000000 &lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;The question is in what format do i have to send the date in to the addFeatures function&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;Thank you for the help&lt;/SPAN&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Wed, 06 Feb 2013 08:54:49 GMT</pubDate>
      <guid>https://community.esri.com/t5/arcgis-javascript-maps-sdk-questions/what-format-of-date-to-send-in-json-in-addfeature/m-p/650056#M60624</guid>
      <dc:creator>MatejSkerjanc</dc:creator>
      <dc:date>2013-02-06T08:54:49Z</dc:date>
    </item>
    <item>
      <title>Re: What format of date to send in json in addFeature rest interface</title>
      <link>https://community.esri.com/t5/arcgis-javascript-maps-sdk-questions/what-format-of-date-to-send-in-json-in-addfeature/m-p/650057#M60625</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;SPAN&gt;I am not sure about it but you can try this in javascript and pass to addfeature&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;Date.parse(YourDate); &lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;this statement actually passes the in some format in which they take base as 1 jan 1970 and above feature gives a 13 digit string of numbers&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;Thanks&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;Manojraj Teli&lt;/SPAN&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Wed, 06 Feb 2013 09:23:43 GMT</pubDate>
      <guid>https://community.esri.com/t5/arcgis-javascript-maps-sdk-questions/what-format-of-date-to-send-in-json-in-addfeature/m-p/650057#M60625</guid>
      <dc:creator>ManojrajTeli</dc:creator>
      <dc:date>2013-02-06T09:23:43Z</dc:date>
    </item>
    <item>
      <title>Re: What format of date to send in json in addFeature rest interface</title>
      <link>https://community.esri.com/t5/arcgis-javascript-maps-sdk-questions/what-format-of-date-to-send-in-json-in-addfeature/m-p/650058#M60626</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;SPAN&gt;Dear Manojraj Teli&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;the results 'm getting with this are odd numbers but indeed it works! The only problem is it changes 1970.1.1. to something in the lines of 1969.x.x&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;Did you ever get this behavior?&lt;/SPAN&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Wed, 06 Feb 2013 10:44:31 GMT</pubDate>
      <guid>https://community.esri.com/t5/arcgis-javascript-maps-sdk-questions/what-format-of-date-to-send-in-json-in-addfeature/m-p/650058#M60626</guid>
      <dc:creator>MatejSkerjanc</dc:creator>
      <dc:date>2013-02-06T10:44:31Z</dc:date>
    </item>
    <item>
      <title>Re: What format of date to send in json in addFeature rest interface</title>
      <link>https://community.esri.com/t5/arcgis-javascript-maps-sdk-questions/what-format-of-date-to-send-in-json-in-addfeature/m-p/650059#M60627</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;SPAN&gt;Not exactly but in our apple Map App it was returning this value and also for our custom tooltip is was giving same format issue so had to convert it back.&lt;/SPAN&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Wed, 06 Feb 2013 10:52:36 GMT</pubDate>
      <guid>https://community.esri.com/t5/arcgis-javascript-maps-sdk-questions/what-format-of-date-to-send-in-json-in-addfeature/m-p/650059#M60627</guid>
      <dc:creator>ManojrajTeli</dc:creator>
      <dc:date>2013-02-06T10:52:36Z</dc:date>
    </item>
    <item>
      <title>Re: What format of date to send in json in addFeature rest interface</title>
      <link>https://community.esri.com/t5/arcgis-javascript-maps-sdk-questions/what-format-of-date-to-send-in-json-in-addfeature/m-p/650060#M60628</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;SPAN&gt;it seems to be deducting one hour or so..will investigate out later further.&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;Thank you!&lt;/SPAN&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Wed, 06 Feb 2013 12:42:03 GMT</pubDate>
      <guid>https://community.esri.com/t5/arcgis-javascript-maps-sdk-questions/what-format-of-date-to-send-in-json-in-addfeature/m-p/650060#M60628</guid>
      <dc:creator>MatejSkerjanc</dc:creator>
      <dc:date>2013-02-06T12:42:03Z</dc:date>
    </item>
    <item>
      <title>Re: What format of date to send in json in addFeature rest interface</title>
      <link>https://community.esri.com/t5/arcgis-javascript-maps-sdk-questions/what-format-of-date-to-send-in-json-in-addfeature/m-p/650061#M60629</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;SPAN&gt;In Javascript I have been able to use Date().valueOf() to return primitive value of the current date.&amp;nbsp; I found that other options were yielding odd results and using the valueOf required much less coding/formating.&amp;nbsp; &lt;/SPAN&gt;&lt;BR /&gt;&lt;PRE class="lia-code-sample line-numbers language-none"&gt;
 var newDate = new Date().valueOf();
&lt;/PRE&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;You can look at other date functions but I believe the issue has to do with the UTC format .. or something like that. If someone has an explanation or a different option that would be great.&lt;/SPAN&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Sun, 12 Dec 2021 03:34:06 GMT</pubDate>
      <guid>https://community.esri.com/t5/arcgis-javascript-maps-sdk-questions/what-format-of-date-to-send-in-json-in-addfeature/m-p/650061#M60629</guid>
      <dc:creator>DianaBenedict</dc:creator>
      <dc:date>2021-12-12T03:34:06Z</dc:date>
    </item>
    <item>
      <title>Re: What format of date to send in json in addFeature rest interface</title>
      <link>https://community.esri.com/t5/arcgis-javascript-maps-sdk-questions/what-format-of-date-to-send-in-json-in-addfeature/m-p/650062#M60630</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;SPAN&gt;Diana the valueOf returns the same result as without the value for me. Or am i well possibly doing something wrong.&lt;/SPAN&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Fri, 08 Feb 2013 08:48:01 GMT</pubDate>
      <guid>https://community.esri.com/t5/arcgis-javascript-maps-sdk-questions/what-format-of-date-to-send-in-json-in-addfeature/m-p/650062#M60630</guid>
      <dc:creator>MatejSkerjanc</dc:creator>
      <dc:date>2013-02-08T08:48:01Z</dc:date>
    </item>
    <item>
      <title>Re: What format of date to send in json in addFeature rest interface</title>
      <link>https://community.esri.com/t5/arcgis-javascript-maps-sdk-questions/what-format-of-date-to-send-in-json-in-addfeature/m-p/650063#M60631</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;SPAN&gt;I just stepped through my code and it looks like the date values are returned as follow:&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;var newDate = new Date().valueOf() &lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;newDate = 1360353562367&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;var newDate = new Date(); (without the ,valueOf() )&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;newDate = Fri Feb 8 13:09:05 MST 2013&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;In my case, if I do not set the date to .valueOf() I get an exception or sometimes it just converts it to weird cases.&amp;nbsp; However, I found that when use the .valueOf the date gets converted to the UTC format. Again, I am not sure if this is the best implementation but it seems to work on my system - I am able to insert a new feature with a date stamp. &lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;Sometimes, I oticed that I needed to do a complete refresh and empty out all cache by selecting &amp;lt;ctrl&amp;gt; &amp;lt;F5&amp;gt; when I initially load the page; just to make sure that everything is all a new ... just a hunch though. I found that the world of web development really has a lot of external unknowns. Good luck!&lt;/SPAN&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Fri, 08 Feb 2013 18:17:44 GMT</pubDate>
      <guid>https://community.esri.com/t5/arcgis-javascript-maps-sdk-questions/what-format-of-date-to-send-in-json-in-addfeature/m-p/650063#M60631</guid>
      <dc:creator>DianaBenedict</dc:creator>
      <dc:date>2013-02-08T18:17:44Z</dc:date>
    </item>
    <item>
      <title>Re: What format of date to send in json in addFeature rest interface</title>
      <link>https://community.esri.com/t5/arcgis-javascript-maps-sdk-questions/what-format-of-date-to-send-in-json-in-addfeature/m-p/650064#M60632</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;SPAN&gt;Hmm i'm passing in my own date as parameter...anyhow thank you both, you've been most helpful.&lt;/SPAN&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Sat, 09 Feb 2013 09:04:27 GMT</pubDate>
      <guid>https://community.esri.com/t5/arcgis-javascript-maps-sdk-questions/what-format-of-date-to-send-in-json-in-addfeature/m-p/650064#M60632</guid>
      <dc:creator>MatejSkerjanc</dc:creator>
      <dc:date>2013-02-09T09:04:27Z</dc:date>
    </item>
    <item>
      <title>Re: What format of date to send in json in addFeature rest interface</title>
      <link>https://community.esri.com/t5/arcgis-javascript-maps-sdk-questions/what-format-of-date-to-send-in-json-in-addfeature/m-p/650065#M60633</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;SPAN&gt;I found the answer to the problem of losing one hour. As assumed the problem is in local date time type&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;A href="http://stackoverflow.com/questions/2587345/javascript-date-parse"&gt;http://stackoverflow.com/questions/2587345/javascript-date-parse&lt;/A&gt;&lt;SPAN&gt; &lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;and a solid link &lt;/SPAN&gt;&lt;A href="http://blog.dygraphs.com/2012/03/javascript-and-dates-what-mess.html"&gt;http://blog.dygraphs.com/2012/03/javascript-and-dates-what-mess.html&lt;/A&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Tue, 12 Feb 2013 04:51:46 GMT</pubDate>
      <guid>https://community.esri.com/t5/arcgis-javascript-maps-sdk-questions/what-format-of-date-to-send-in-json-in-addfeature/m-p/650065#M60633</guid>
      <dc:creator>MatejSkerjanc</dc:creator>
      <dc:date>2013-02-12T04:51:46Z</dc:date>
    </item>
  </channel>
</rss>

