Trouble with Datetime Format of Webhook POST | Community
Skip to main content
New Participant
October 3, 2022
Solved

Trouble with Datetime Format of Webhook POST

  • October 3, 2022
  • 1 reply
  • 1611 views

I need to submit a datetime in ISO 8601, which Marketo stores datetime as, but in webhooks it looks like they are formatting the token as if you were putting it in an email?

If I hard code the datetime properly formatted (with the T and the offset) the webhook works perfectly and I was wondering if there was a way to do so with a toke since that's how it's stored in the database.

 

Thanks!

This post is no longer active and is closed to new replies. Need help? Start a new post to ask your question.
Best answer by SanfordWhiteman

This has been a longtime annoyance, but for backward compatibility reasons I doubt it’ll ever be changed.

 

Nevertheless, “yyyy-MM-dd HH:mm:ss” in Java terms (“YYYY-MM-DD hh:mm:ss” in ISO terms) is parseable by any capable date parsing library. (Note the space isn't allowed by ISO 8601, but local time/no offset is.)

 

If you must pre-format the datetime, you need to pass it through another webhook-compatible service.

1 reply

SanfordWhiteman
SanfordWhitemanAccepted solution
New Participant
October 3, 2022

This has been a longtime annoyance, but for backward compatibility reasons I doubt it’ll ever be changed.

 

Nevertheless, “yyyy-MM-dd HH:mm:ss” in Java terms (“YYYY-MM-DD hh:mm:ss” in ISO terms) is parseable by any capable date parsing library. (Note the space isn't allowed by ISO 8601, but local time/no offset is.)

 

If you must pre-format the datetime, you need to pass it through another webhook-compatible service.

ChrisCo33Author
New Participant
October 4, 2022

Thanks Sanford. I'll talk with both the middleware and the product teams - we were going to add in a middleware layer eventually anyways.

 

Thanks again!