Setting dateTime precision to milliseconds
We are leveraging an AJO custom action to integrate our journey with an internal API. This API takes a datetime argument in UTC format as follows: yyyy-MM-ddT HH:mm:ss.SZ (ie. 2023-12-01T23:59:59.000Z).
We are attempting to use the nowWithDelta() function within the request parameters of this custom action. The challenge we are running into is the function returns a datetime more precise than what is accepted by the API. The example below will return a value of 2023-11-14T13:15:58.408771377Z:
nowWithDelta(7, "days", "UTC")
What I'm hoping someone can help with is formatting this datetime to return a datetime with precision at milliseconds. From the example above, that would be 2023-11-14T13:15:58.409Z. Is there a way to do this formatting with functions available in AJO custom action request parameters?