How to manipulate date & time in JIRA automation?

When i use this smart value:

{{issue.created.setTimeZone("Asia/Shanghai")}}

this is how the date and time displayed:

2020-05-28T01:46:06.7+0800

 

What can I do for the time to display in more proper way for example like 14:00 instead of T01:46:06.7+0800?

2 answers

1 accepted

0 votes
Answer accepted
John Funk
Community Leader
Community Leader
Community Leaders are connectors, ambassadors, and mentors. On the online community, they serve as thought leaders, product experts, and moderators.
June 1, 2020

Hi @Shikh Ahmad Hafidz Bin Shikh Ahmad Marzuki ,

This is what I use:

{{issue.customField_17038.convertToTimeZone("America/Chicago").longDateTime}}

It's working. Thanks a lot!

John Funk
Community Leader
Community Leader
Community Leaders are connectors, ambassadors, and mentors. On the online community, they serve as thought leaders, product experts, and moderators.
June 3, 2020

Great! Glad I could help a little.  :-)

0 votes
Dave_Liao May 31, 2020

Thanks a lot sir!

Suggest an answer

Log in or Sign up to answer
DEPLOYMENT TYPE
CLOUD
PRODUCT PLAN
STANDARD
PERMISSIONS LEVEL
Site Admin
TAGS
AUG Leaders

Atlassian Community Events