CALCULATE A DATE WITH YEAR VARIABLE (NUMBER) DOESNT WORK

Mattis PASSARD February 9, 2024

Hello Everyone,

I need some help..

I explain :

 

When my customer signs a contract, like 31/01/2020 (DD/MM/YYYY).

The 31/01 became the birthday date.

So i need to set the birthday at 31/01/ {current year +1} = 31/01/2025 (to have a reminder)

 

To calculate the year to add at my signs contract to became my birthday date I do this :

when custom field "SIGNS DATE" is set to a date, set custom field "ADD YEAR" to "{yearshort} - {{%SIGNS DATE}~YY} - 1"

ADD YEAR = 24 - (20 - 1)

ADD YEAR = 24 - 19

ADD YEAR = 5

(its works)

 

And i add 5 years to the date : 

when custom field "ADD YEAR" is set, set custom field "BIRTHDAY DATE" to "{%SIGNS DATE}+{%ADD YEAR}y"

In my head :

BIRTHDAY DATE = 31/01/2020 + 5 years

BIRTHDAY DATE = 31/01/2025

(not working)

 

The error :

Friday, February 9, 2024 10:46 AM

Running automation on board ...

Couldn't read a date in "{%BIRTHDAY DATE}+{%ADD YEAR}y".

The automation finished running.

 

I think i dont understand the arithmetic and formatting date doc :

https://support.atlassian.com/trello/docs/arithmetic-and-formatting-in-date-variables/ 

If anyone can help me on this šŸ™

 

Other doc i've read : 

https://support.atlassian.com/trello/docs/working-with-custom-fields/#custom-field-arithmetic 

 

Thanks you,

Mattis P.

 

1 answer

1 accepted

0 votes
Answer accepted
Dreamsuite Mike
Community Leader
Community Leader
Community Leaders are connectors, ambassadors, and mentors. On the online community, they serve as thought leaders, product experts, and moderators.
February 13, 2024

Hi @Mattis PASSARD 

 

I can tell you what to do to fix this automation:

 

when custom field "ADD YEAR" is set, set custom field "BIRTHDAY DATE" to "{%SIGNS DATE}+{%ADD YEAR}y"

 

when custom field "ADD YEAR" is set, set custom field "BIRTHDAY DATE" to "{{%SIGNS DATE+{{%ADD YEAR}}y}}"

 

There may be a much easier way though.

when custom field "SIGNS DATE" is set, set custom field "BIRTHDAY DATE" to {{%SIGNS DATE={year}y}}
Mattis PASSARD February 15, 2024

Hi Mike !

Thanks you a lot, your last automation works perfectly,

I do

when custom field "SIGNS DATE" is set, set custom field "BIRTHDAY DATE" to {{%SIGNS DATE={year}y+1y}}

To get the next year.

Thanks again ! 

Mattis P.

Like ā€¢ Dreamsuite Mike likes this

Suggest an answer

Log in or Sign up to answer
TAGS
AUG Leaders

Atlassian Community Events