Hi @Gouravdev You figured out you can use $now - but if you use {{$now.toISO()}} as an expression, you’ll convert it to ISO which will be the final format you’re looking for
Ah, sorry! The quickest way to do this would probably be to add replace('+00:00', 'Z')}} at the end of your conversion. For me it would be {{$now.toISO().replace('+01:00', 'Z')}}, for example, and provides this:
Hi - I had to work between UTC and ISO8601 dates in a workflow, and the MomentJS library can actually handle this natively, I think what you want to use is DateTime.utc().toISO(). This will always work regardless of timezone, whereas search/replace will introduce an error if the server time is ever different from the one expected during workflow creation.
Here’s what that looks like given the current time for where I am:
$now(): Wed Oct 25 2023 13:41:13 GMT+1300 (New Zealand Daylight Time)
$now.toISO(): 2023-10-25T13:41:13.403+13:00
Datetime.utc().toISO(): 2023-10-25T00:41:13.403Z