Create
cancel
Showing results for 
Search instead for 
Did you mean: 
Sign up Log in

Difference between 2 dates in days

Tehmina Aslam
Contributor
February 11, 2025

I have 2 fields Due date and Modified Due date. I want to get the difference between these two dates in days. 

I tried the following formula: 

{{[issue.Due date.diff(issue.Modified Due date).days}}

Then I tried even the Field ID:

{{[issue.Due date.diff(issue.customfield_10837).days}}

 

But that still does not work, The rule runs successfully but the field Lag time is never updated with value. 

2025-02-12_12h57_15.png

1 answer

1 accepted

1 vote
Answer accepted
Vishal Biyani
Rising Star
Rising Star
Rising Stars are recognized for providing high-quality answers to other users. Rising Stars receive a certificate of achievement and are on the path to becoming Community Leaders.
February 12, 2025 edited

@Tehmina Aslam 

Can you copy the calculation in smart variable and then use that smart variable to update the issue? i think it should help resolve the issue.

 

Also there looks to be an extra [ bracket before Issue. That is not needed

 

Share your audit log as well

Tehmina Aslam
Contributor
February 12, 2025

Thanks man, there was an extra bracket :D 

 

{{issue.Due date.diff(issue.modifiedDueDate).days}}

 

Like Vishal Biyani likes this
Vishal Biyani
Rising Star
Rising Star
Rising Stars are recognized for providing high-quality answers to other users. Rising Stars receive a certificate of achievement and are on the path to becoming Community Leaders.
February 13, 2025

@Tehmina Aslam 

if this worked for you, please accept the answer.

Suggest an answer

Log in or Sign up to answer
DEPLOYMENT TYPE
CLOUD
PRODUCT PLAN
STANDARD
PERMISSIONS LEVEL
Product Admin
TAGS
atlassian, ace, atlassian community event, donation, girls who code, women in tech, malala fund, plan international, kudos, community badge, badge, atlassian badge, International Women’s month, International Women’s Day, women's month, women's day

10 for Change at Atlassian Community Events

Show up and give back by attending an Atlassian Community Event: we’ll donate $10 for every event attendee in March!

Join an Atlassian Community Event!
AUG Leaders

Upcoming Jira Events