Error sending Date Picker value through API

We are sending a date value to a date picker property in the form of YYYY-MM-DD (which we’ve confirmed with the app is ISO8601 compliant, but maybe that’s intrinsic of the date when written that way - don’t know what I’m talking about)

we are getting this error:

“validationResults”: [
{
“isValid”: false,
“message”: “2020-12-01 was not a valid long. Portal xxxxxxx, object type 0-3”,
“error”: “INVALID_LONG”,
“name”: “invoice_sent”
}
],
“status”: “error”,
“message”: “Property values were not valid”,

The Hubspot documentation says this:

Examples:

  • 2015-05-01 would be used for May 1 2015

Not really a developer - any tips you can help me with?

Hey @JakeW

You will want the date in the unix timestamp format as detailed here :grinning_face:

You are working your way up the ladder as a developer :wink:

Thanks @dennisedson - am I misreading the FAQ in this case then? One example given is in Unix as you’ve suggested, but it also lists a stock YYYY-MM-DD as an ‘example’ of how to send dates to a Date Picker property.
Here’s a screenshot from this article I’m referring to

I’m only going the extra mile to ask here because our app doesn’t have an automatic means to reformat dates into a Unix timestamp

Hey @JakeW ,

Thanks for following up on that. Looks like we may have some contradictory messaging :thinking:

Would you do me a favor and send me the endpoint that you are posting to (minus hapikey) as well as the json body?

Here is a post with a similar issue as well as the referenced docs

Once you send me the details I asked for, I will test and make sure we get some consistency :grinning_face:

Thanks @dennisedson - the docs mention UNIX timestamp - I think we can do that through the app we’re trying to do this with. I don’t know how to determine what endpoint we are posting to, or what a hapikey and json body are, so I’m not sure I can help further o_o
For now I’ll just assume that we need to send it in UNIX in milliseconds, and it’s incorrect to say that date pickers can receive a straight up YYYY-MM-DD value …

I am running into the same issue with using unix timestamp as well and have asked this question multiple times via support but no answer.