property from the JSON i will be able to update the record. and i am converting the date inside our c# application to unix based ..so the value i am passing will be 1572525038454 (as shown in the above json)..
It looks like the tps_update_date property in that account has the type: "date" instead of datetime.
As mentioned in this article, properties with a type of date only accept UNIX millisecond timestamps at midnight UTC: "If you try to set a value that is not midnight UTC, you will receive an error."
In your first post, you shared the timestamp value 1572525038454, which is not at UTC midnight. If you send 1572480000000 instead, the date field should accept it.
Alternatively, you can change the tps_update_date property to be the type: "datetime" with this endpoint. See the example below:
PUT
https://api.hubapi.com/properties/v1/companies/groups/named/tps_update_date?hapikey=key
{ type: "datetime" }
If tps_update_date property is datetime, then it will accept 1572525038454.
Unable to populate Date picker value using the API "Error Bad request"
SOLVE
Hi Isaac,
thanks for the helpful reply. i fix this by converting the Date instead of the DateTime inside my code, and now i am able to populate the date picker value through the API.
I do not see a company property with the internal name tps_update_date in your account with the Hub ID ending in 0966. Am I looking in the correct account or did you delete the property?
It looks like the tps_update_date property in that account has the type: "date" instead of datetime.
As mentioned in this article, properties with a type of date only accept UNIX millisecond timestamps at midnight UTC: "If you try to set a value that is not midnight UTC, you will receive an error."
In your first post, you shared the timestamp value 1572525038454, which is not at UTC midnight. If you send 1572480000000 instead, the date field should accept it.
Alternatively, you can change the tps_update_date property to be the type: "datetime" with this endpoint. See the example below:
PUT
https://api.hubapi.com/properties/v1/companies/groups/named/tps_update_date?hapikey=key
{ type: "datetime" }
If tps_update_date property is datetime, then it will accept 1572525038454.
Unable to populate Date picker value using the API "Error Bad request"
SOLVE
Hi Isaac,
thanks for the helpful reply. i fix this by converting the Date instead of the DateTime inside my code, and now i am able to populate the date picker value through the API.