The Atlassian Community Forums are currently in read-only mode. We will be relaunching on a new platform on September 22 (read more here). We apologize for the extended downtime. For concerns or questions, please email communitymanagers@atlassian.com. See you on the other side, on the new Atlassian Community Forums! :)

×

Forums

Articles
Create
cancel
Showing results for 
Search instead for 
Did you mean: 

DAYS_BETWEEN formula jira structure

Alex Agn
Contributor
December 17, 2023

I'm busy creating another structure and since long time I wanted to apply the days-between formula again.
But it seems like I must have forgotten something.

My formula (in formula column): 

IF DAYS_BETWEEN(datepicker,today()<5: 
"Less than 5 days to go!"

 

I've a case with date picker = 29/01/2024  & today() = 17/12/2023
and there my formula returns "Less than 5 days to go!"  ???

Does anyone see what I missed?

Additionally, I was wondering of Days_between could be combined: 

IF (DAYS_BETWEEN(datepicker,today()<5 ) AND (IF DAYS_BETWEEN(datepicker,today()>0):"Oh no" ?


Kr,
Alexander

2 answers

1 accepted

Comments for this post are closed

Community moderators have prevented the ability to post new answers.

Post a new question

2 votes
Answer accepted
Stepan Kholodov
Community Champion
December 18, 2023

Hello @Alex Agn 

A bracket seems to be missing from the formula and as Hana said above - the days_between function can return a negative value depending on which date comes first(you can switch their places in brackets if needed). If you want to combine both conditions, the formula can look like this:

IF DAYS_BETWEEN(datepicker,today())<5: 
"Less than 5 days to go!" else
IF DAYS_BETWEEN(datepicker,today())<4 AND IF DAYS_BETWEEN(datepicker,today())>0:"Oh no"

I hope this helps. If you need further assistance, please reach out to us directly at our support portal and we'll get back to you shortly.

Best regards,
Stepan
Tempo (the Structure app vendor)

0 votes
Hana Kučerová
Community Champion
December 17, 2023

Hi @Alex Agn ,

please see here

DAYS_BETWEEN returns a negative value if DateTime2 occurs earlier than DateTime1.

Also it should be possible to use logical AND.