Webhook integration - time not displayed in date-time json field

Please find the link to Stack Overflow where I explain the problem at hand:

Link to Stack Overflow posting!

Thanks in advance.

Hi @ItsCiccio197

Welcome to the community. Along the same line :slight_smile: when you change the time of a date/time column the webhook will not fire at all. It only fires when you changed date (or date & time). I have reported this back in April and development is aware. Don’t know if we will see a resolution any time soon.

Yes the webhook fires when the date/time is changed or updated, that part works. What doesn’t work is the time not showing up in the JSON passed as a request to the HTTP cloud function.

JSON itself does not specify how dates should be represented, but JavaScript does. What .NET does is a non-standard hack/extension. The problem with JSON date and really JavaScript in general – is that there’s no equivalent literal representation for dates. In JavaScript following Date constructor straight away converts the milliseconds since 1970 to Date as follows:

var jsonDate = new Date(1297246301973);

Then let’s convert it to js format:

var date = new Date(parseInt(jsonDate.substr(6)));

The substr() function takes out the /Date( part, and the parseInt() function gets the integer and ignores the )/ at the end. The resulting number is passed into the Date constructor .

For ISO-8601 formatted JSON dates, just pass the string into the Date constructor:

var date = new Date(jsonDate);