Convert negative number into positive

Muhammad Moazzam Hassan
Contributor
January 18, 2023

Hi, 

I want to convert negative numbers into positive ones, what I am trying to achieve is to put the date difference in now and create days like. 5 days have passed. What smart value I am using is {{now.diff(issue.Created).days}} but it returns the number in negative. How can I convert in positive and add into my field?

1 answer

1 accepted

1 vote
Answer accepted
Tom Lister
Community Leader
Community Leader
Community Leaders are connectors, ambassadors, and mentors. On the online community, they serve as thought leaders, product experts, and moderators.
January 18, 2023

Hi @Muhammad Moazzam Hassan 

Try 

{{now.diff(issue.Created).days.abs}}

Muhammad Moazzam Hassan
Contributor
January 18, 2023

Perfect!

Suggest an answer

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

Atlassian Community Events