<?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: datetime not working in the submit form api in APIs &amp; Integrations</title>
    <link>https://community.hubspot.com/t5/APIs-Integrations/datetime-not-working-in-the-submit-form-api/m-p/276534#M25191</link>
    <description>&lt;P&gt;Great to hear&amp;nbsp;&lt;a href="https://community.hubspot.com/t5/user/viewprofilepage/user-id/95549"&gt;@edwinbbu&lt;/a&gt;&amp;nbsp;!&lt;/P&gt;</description>
    <pubDate>Fri, 21 Jun 2019 13:33:13 GMT</pubDate>
    <dc:creator>cbarley</dc:creator>
    <dc:date>2019-06-21T13:33:13Z</dc:date>
    <item>
      <title>datetime not working in the submit form api</title>
      <link>https://community.hubspot.com/t5/APIs-Integrations/datetime-not-working-in-the-submit-form-api/m-p/276228#M25164</link>
      <description>&lt;P&gt;&lt;SPAN&gt;I have referred the developer &lt;A href="https://developers.hubspot.com/docs/faq/how-should-timestamps-be-formatted-for-hubspots-apis" target="_blank" rel="noopener"&gt;documentation&lt;/A&gt;&lt;/SPAN&gt;&amp;nbsp;regarding sending timestamp for hubspot submit form api&lt;SPAN&gt;. &lt;/SPAN&gt;&lt;SPAN&gt;I even tried the default 1427997766000 shown in the documentation and it is not working.&amp;nbsp;&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Thu, 20 Jun 2019 05:57:21 GMT</pubDate>
      <guid>https://community.hubspot.com/t5/APIs-Integrations/datetime-not-working-in-the-submit-form-api/m-p/276228#M25164</guid>
      <dc:creator>edwinbbu</dc:creator>
      <dc:date>2019-06-20T05:57:21Z</dc:date>
    </item>
    <item>
      <title>Re: datetime not working in the submit form api</title>
      <link>https://community.hubspot.com/t5/APIs-Integrations/datetime-not-working-in-the-submit-form-api/m-p/276329#M25172</link>
      <description>&lt;P&gt;Hi&amp;nbsp;&lt;a href="https://community.hubspot.com/t5/user/viewprofilepage/user-id/95549"&gt;@edwinbbu&lt;/a&gt;&amp;nbsp;, happy to help! I'll need a bit more info first:&lt;/P&gt;
&lt;OL&gt;
&lt;LI&gt;is your field a &lt;STRONG&gt;date&lt;/STRONG&gt; field, or a &lt;STRONG&gt;datetime&lt;/STRONG&gt; field? If you have a link to that property in your account, that would be great to have. Date fields must be set to &lt;EM&gt;UTC midnight&lt;/EM&gt; which is why I ask.&lt;/LI&gt;
&lt;LI&gt;Any errors you are seeing when submitting the form via API would be awesome to see as well.&lt;/LI&gt;
&lt;LI&gt;Are you using the v2 or v3 (with Ajax Support) endpoint?&amp;nbsp;&lt;/LI&gt;
&lt;LI&gt;Can you please link a page where your form lives and is being submitted via the API?&lt;/LI&gt;
&lt;/OL&gt;
&lt;P&gt;Thank you!&lt;/P&gt;</description>
      <pubDate>Thu, 20 Jun 2019 14:24:19 GMT</pubDate>
      <guid>https://community.hubspot.com/t5/APIs-Integrations/datetime-not-working-in-the-submit-form-api/m-p/276329#M25172</guid>
      <dc:creator>cbarley</dc:creator>
      <dc:date>2019-06-20T14:24:19Z</dc:date>
    </item>
    <item>
      <title>Re: datetime not working in the submit form api</title>
      <link>https://community.hubspot.com/t5/APIs-Integrations/datetime-not-working-in-the-submit-form-api/m-p/276362#M25175</link>
      <description>&lt;P&gt;Hi&amp;nbsp;&lt;a href="https://community.hubspot.com/t5/user/viewprofilepage/user-id/11385"&gt;@cbarley&lt;/a&gt;&amp;nbsp;,&amp;nbsp;&lt;/P&gt;&lt;P&gt;1. The field type is date picker. ( it is shown in contact property) .&lt;/P&gt;&lt;P&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp;Here is the link to the &lt;A href="https://app.hubspot.com/property-settings/5918065/contact/custom_date" target="_self"&gt;contact property&lt;/A&gt;&lt;/P&gt;&lt;P&gt;2. I am not seeing any error when submitting the form via api. I am submitting the datetime field(unix format) along with other fields. All other fields are getting updated.&lt;/P&gt;&lt;P&gt;3. I am not sending via ajax endpoint.&lt;/P&gt;&lt;P&gt;4. I am testing the forms via localhost so I am unable to share the link to page which is getting submitted to forms api.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Thu, 20 Jun 2019 15:50:19 GMT</pubDate>
      <guid>https://community.hubspot.com/t5/APIs-Integrations/datetime-not-working-in-the-submit-form-api/m-p/276362#M25175</guid>
      <dc:creator>edwinbbu</dc:creator>
      <dc:date>2019-06-20T15:50:19Z</dc:date>
    </item>
    <item>
      <title>Re: datetime not working in the submit form api</title>
      <link>https://community.hubspot.com/t5/APIs-Integrations/datetime-not-working-in-the-submit-form-api/m-p/276370#M25176</link>
      <description>&lt;P&gt;Thanks for that info&amp;nbsp;&lt;a href="https://community.hubspot.com/t5/user/viewprofilepage/user-id/95549"&gt;@edwinbbu&lt;/a&gt;&amp;nbsp;, since your field is just a date field, the field &lt;EM&gt;must&lt;/EM&gt; be set to &lt;STRONG&gt;UTC midnight&lt;/STRONG&gt;, or the endpoint will not know what to do with that value, and HubSpot will not store the value in the CRM. Further, the V2 Forms API does not do any sort of validation, so you won't get an error if the data isn't sent to HubSpot, we'll just accept anything in that instance. For that reason, the &lt;A href="https://developers.hubspot.com/docs/methods/forms/submit_form_v3" target="_blank" rel="noopener"&gt;V3 endpoint&lt;/A&gt; might be a better option. That said, if you're not seeing an error, would you be able to send the following info:&lt;/P&gt;
&lt;OL&gt;
&lt;LI&gt;The full endpoint you're submitting data to.&lt;/LI&gt;
&lt;LI&gt;The raw request request payload you're sending to HubSpot.&lt;/LI&gt;
&lt;/OL&gt;
&lt;P&gt;I was able to create this simple app that submits to the V2 Forms API a while ago where I've added in a date picker field. This properly submits to HubSpot as a UTC midnight value in milliseconds. Feel free to use it as a guide:&amp;nbsp;&lt;A href="https://repl.it/@cbarley10/Forms-V2-endpoint-in-Node-with-a-front-end" target="_blank" rel="noopener"&gt;https://repl.it/@cbarley10/Forms-V2-endpoint-in-Node-with-a-front-end&lt;/A&gt;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;Here's an example of a contact I just created via that form with the value:&amp;nbsp;&lt;A href="http://prntscr.com/o4gx5j" target="_blank"&gt;http://prntscr.com/o4gx5j&lt;/A&gt;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Thu, 20 Jun 2019 16:21:51 GMT</pubDate>
      <guid>https://community.hubspot.com/t5/APIs-Integrations/datetime-not-working-in-the-submit-form-api/m-p/276370#M25176</guid>
      <dc:creator>cbarley</dc:creator>
      <dc:date>2019-06-20T16:21:51Z</dc:date>
    </item>
    <item>
      <title>Re: datetime not working in the submit form api</title>
      <link>https://community.hubspot.com/t5/APIs-Integrations/datetime-not-working-in-the-submit-form-api/m-p/276472#M25185</link>
      <description>&lt;P&gt;Thanks a lot&amp;nbsp;&lt;a href="https://community.hubspot.com/t5/user/viewprofilepage/user-id/11385"&gt;@cbarley&lt;/a&gt;&amp;nbsp; Finally the date type worked after converting to utc midnight format.&lt;/P&gt;</description>
      <pubDate>Fri, 21 Jun 2019 06:18:55 GMT</pubDate>
      <guid>https://community.hubspot.com/t5/APIs-Integrations/datetime-not-working-in-the-submit-form-api/m-p/276472#M25185</guid>
      <dc:creator>edwinbbu</dc:creator>
      <dc:date>2019-06-21T06:18:55Z</dc:date>
    </item>
    <item>
      <title>Re: datetime not working in the submit form api</title>
      <link>https://community.hubspot.com/t5/APIs-Integrations/datetime-not-working-in-the-submit-form-api/m-p/276534#M25191</link>
      <description>&lt;P&gt;Great to hear&amp;nbsp;&lt;a href="https://community.hubspot.com/t5/user/viewprofilepage/user-id/95549"&gt;@edwinbbu&lt;/a&gt;&amp;nbsp;!&lt;/P&gt;</description>
      <pubDate>Fri, 21 Jun 2019 13:33:13 GMT</pubDate>
      <guid>https://community.hubspot.com/t5/APIs-Integrations/datetime-not-working-in-the-submit-form-api/m-p/276534#M25191</guid>
      <dc:creator>cbarley</dc:creator>
      <dc:date>2019-06-21T13:33:13Z</dc:date>
    </item>
  </channel>
</rss>

