SOLVED

Re: Trouble with Datetime Format of Webhook POST

Go to solution
Chris_Conley_86
Level 2

Trouble with Datetime Format of Webhook POST

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?

Chris_Conley_86_0-1664826264719.png

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!

1 ACCEPTED SOLUTION

Accepted Solutions
SanfordWhiteman
Level 10 - Community Moderator

Re: Trouble with Datetime Format of Webhook POST

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.

View solution in original post

2 REPLIES 2
SanfordWhiteman
Level 10 - Community Moderator

Re: Trouble with Datetime Format of Webhook POST

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.

Chris_Conley_86
Level 2

Re: Trouble with Datetime Format of Webhook POST

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!