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

Earn badges and make progress

You're on your way to the next level! Join the Kudos program to earn points and save your progress.

Deleted user Avatar
Deleted user

Level 1: Seed

25 / 150 points

Next: Root

Avatar

1 badge earned

Collect

Participate in fun challenges

Challenges come and go, but your rewards stay with you. Do more to earn more!

Challenges
Coins

Gift kudos to your peers

What goes around comes around! Share the love by gifting kudos to your peers.

Recognition
Ribbon

Rise up in the ranks

Keep earning points to reach the top of the leaderboard. It resets every quarter so you always have a chance!

Leaderboard

Calculating difference between two date custom fields in Trello

I am looking if there is a way to calculate the difference between two date custom fields using Butler? Ex: I have 'Start Date' and 'Completion Date' as 2 custom fields and if I want to know the duration of the task, want to write a Butler rule which will calculate the difference of these 2 dates and return in another custom field of 'Task time'. Can someone help?

3 answers

0 votes
richard hoare
I'm New Here
I'm New Here
Those new to the Atlassian Community have posted less than three times. Give them a warm welcome!
Feb 01, 2024

hey folks, not sure if anyone got any further with this, but i came up with a fix last night after a few attempts.. here's the basic gist..

 

you'll need three custome fields: 1. Start Date (presumably populated earlier on in board); 2. Completion Date (in my case, populated when you move the card to list "Completed"); 3. Days (which is numeric field where the following string comes in. 

 

when a card is added to list "Completed", set date custom field "Completion Date" to now, set custom field "Days" to "({{%Completion Date}~X} - {{%Start Date}~X}) / 86400"

 

what's happening... the Completion Date and Start Date are converted to Unix time code (using "~X") - they're then subtracted from one another which gives an absolute value in seconds. that calculation is then divided by number of seconds in a day (86400) - but the key part to this was placing the initial equation in standard brackets (wrapped around the curly brackets) in order to ensure the subtracted total figure is the figure which is being divided by 86400. 

 

hope this helps someone!

 

thanks!

 

I'd like to know the answer as well. I have the same message. Thanks!

0 votes
Vero Rivas
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.
Apr 29, 2021

Hi @Manjula Madineedi 

   Look at this post, maybe can help you

   https://help.trello.com/article/1159-arithmetic-in-date-variables

Cheers

   

Thanks for sharing @Vero Rivas . But that doesn't work for me. Here is the rule I wrote:

when a card is moved into list "Completed", set custom field "* Hours Task Time" to "{{%Completion Date}-{%In Progress Start}}"

When I checked the Command log of the rule, it had this message -- "NaN" is not a valid numeric value.

I am not sure what's wrong in the above rule..

I'd like to know the answer to this as well. I have the same custom field set up with start date. Trello seems to have updated the calendar to allow start and end dates. That's the only way I've been able to get the timeframe between start and end. 

Like PROYECTOS DC SPAIN likes this

Suggest an answer

Log in or Sign up to answer
TAGS
AUG Leaders

Atlassian Community Events