Aug 10, 2018 9:10 AM
I'm working as a developer for a company with three brands which in turn use separate Hubspot accounts:
We use your api to create contacts and deals for all three brands using the same piece of code in a single bookingsystem using the same server. Nevertheless we are having trouble creating dates in deals in the 3068974 account. It works fine for the other brands, where dates format as dd/mm/yyyy.
I have tried to export the one of the deal propertys data to csv:
Deal ID,"Deal Name","Arrival Date"
46827404,"6207705","2017-01-28 01:00","2016-10-26 23:35"
46827544,"6207709","2017-01-21 01:00","2016-10-26 23:35"
46827824,"6207720","2016-12-25 01:00","2016-10-26 23:36"
which looks fine.
For 3068974 the same date deal properties format as number Unix timestamp (e.g. 1533686400000) in the Deals UI. I can convert the timestamp to human readable date using https://www.epochconverter.com/
Export of these data:
Deal ID,"Deal Name","Returndate"
We have compared the language and date settings of the three accounts and they are the same (as far as I can see), but the issue remains. Hubspot Support wasn't able to help and told me to ask my question here at the Developers forum.
Could you help me solve this issue?
Aug 17, 2018 11:07 AM
I jumped into your portal to take a look, and it appears that the
returndate property you're seeing issues with isn't a date property, it's a text property. This is why the timestamp values aren't being formatted to dates. Can you jump into your Deal property settings and update the property definition?
Aug 20, 2018 2:37 AM
Thank you, and I have been wandering about the "Single-line text" Field-Type, too. The thing is I'm working with three Hubspot portals and the other two have the same Field-Type for the returndate property, but not the same problem:
Can you explain why?
Aug 23, 2018 2:11 PM
I'm not entirely sure why the other two appear to be formatting correctly, but it appears to be related to the differences in the way that the frontend processes
datetime values. The two examples you listed above are
datetime, so it's possible that the frontend processes them differently. It's tough to compare them at this stage since you've fixed the original property type, but going forward you shouldn't see any issues so long as the property types are set properly to
Oct 4, 2018 6:33 PM
This looks like the solution I need as well, however, when I visit the Deal Property settings for Close Date, I am not given the option to change from a single-line text field to a date field.
I'm the super admin and original creator of our HS account so I don't think its a permission issue. Any insight?