Forums

Articles
Create
cancel
Showing results for 
Search instead for 
Did you mean: 

I would like to insert the creation date in the format "yyyy-MM-dd HH:mm"

Deleted user February 22, 2022

I would like to insert the creation date in the format "yyyy-MM-dd HH:mm" with the time zone "Europe/Rome" in the summary of an automation

I have tried several commands without success:
Unknown macro: {{issue.created.convertToTimeZone("Europe/Rome").format("yyyy-MM-dd HH:mm"}
}
Unknown macro: {{issue.created.setTimeZone("Europe/Rome").format("yyyy-MM-dd HH:mm"}
}
I finally "solved" using the minusMinutes() function...

where am I going wrong?
{{issue.created.minusMinutes(107).format("yyyy-MM-dd HH:mm")}} - {{issue.issueType.name}} for {{initiator.name}}

References:
https://support.atlassian.com/cloud-automation/docs/examples-of-using-smart-values-with-dates/
https://confluence.atlassian.com/automation/date-and-time-functions-993924864.html

1 answer

1 accepted

2 votes
Answer accepted
Mark Segall
Community Champion
February 22, 2022

Hi @[deleted] - You were really close.  You were missing a close parentheses on your format command.  This worked for me:

{{issue.created.convertToTimeZone("Europe/Rome").format("yyyy-MM-dd HH:mm")}}
Deleted user February 22, 2022

@Mark Segall  thank you you have been very helpful indeed.

Like Consulente Atlassian likes this

Suggest an answer

Log in or Sign up to answer
TAGS
AUG Leaders

Atlassian Community Events