Hello 😊
Here's my Assign Message Policy, I'm trying to get the value of the timestamp by following the ISO format, however using this configuration, I am unable to do that.
<AssignVariable>
<Name>timeStamp</Name>
<Template>{timeFormat('yyyy-MM-dd\'T\'HH:mm:ss.SSSXXX',system.time)}</Template>
</AssignVariable>
Any help is greatly appreciated, and thank you in advance!
Solved! Go to Solution.
Try this
<AssignMessage name='AM-Timestamp'>
<IgnoreUnresolvedVariables>false</IgnoreUnresolvedVariables>
<AssignVariable>
<Name>iso8601Format</Name>
<Value>yyyy-MM-dd'T'HH:mm:ss'Z'</Value>
</AssignVariable>
<AssignVariable>
<Name>formattedTime</Name>
<Template>{timeFormatUTCMs(iso8601Format,system.timestamp)}</Template>
<!-- expresed in UTC, eg, 2020-10-02T15:59:26Z -->
</AssignVariable>
</AssignMessage>
I guess I should put that into the documentation as an example, eh?