Change the Date Time format when reading issue information.

Nathan Hutchins March 9, 2022

I have a custom issue field that is a Date Time Picker. I then send an email and use that date time in the email, however the format is a little strange and I am wondering if I am able to display it differently?

Currently how I read it in Jira Automation:
{{issue.Return Date}}

How it displays: 
2022-03-11T19:30:00.0+0000

I want to try and display it like: 2022-03-11 11:00 am
I also just now noticed that it's in a different time zone too. I want it in PST

Any ideas on how I can do this?

1 answer

1 accepted

1 vote
Answer accepted
Stefan Salzl
Community Leader
Community Leader
Community Leaders are connectors, ambassadors, and mentors. On the online community, they serve as thought leaders, product experts, and moderators.
March 9, 2022

Hi @Nathan Hutchins 

the following pattern should do the format as expected:

{{now.convertToTimeZone("PST8PDT").format("yyyy-MM-dd hh:mm a")}}

see documentation to date/time smart values:
https://support.atlassian.com/cloud-automation/docs/jira-smart-values-date-and-time/

Please let me know if this works.

Best
Stefan

Nathan Hutchins March 9, 2022

Perfect! Thank you very much. 

Like Stefan Salzl likes this
Stefan Salzl
Community Leader
Community Leader
Community Leaders are connectors, ambassadors, and mentors. On the online community, they serve as thought leaders, product experts, and moderators.
March 9, 2022

You are welcome 😉🙌

Suggest an answer

Log in or Sign up to answer