AnsweredAssumed Answered

date calculation: changing deadline field based on current date

Question asked by danielone on May 14, 2016
Latest reply on May 15, 2016 by karina

Hi all,

 

And nice to meet you all! I have a question I am sure you can help me to solve

I am designing a solution and I try do describe my need:

 

I have the following date fields:

"first deadline"

"second deadline"

"third deadline"

 

and so on until "twelfth deadline".

First deadline is user input with a drop down calendar, other deadlines are calculation fields with first deadline with +1 month each. So far so good.

 

Now I have in my solution a field when I need to display the next deadline based on current day.

 

EXAMPLE

 

first deadline -> 1/2/2000

second deadline ->1/3/2000

third deadline -> 1/4/2000

and so on.

 

On the days from 1/1/2000 to 1/2/2000 I have to see in this field "1/2/2000"

On the days from 2/2/2000 to 28/2/2000 I have to see in this field "1/3/2000"

On the days from 1/3/2000 to 31/3/2000 I have to see in this field "1/4/2000" etc.

 

I created a "current deadline" calculation field with the following calculation:

 

Case (

 

first_deadline  ≥  Get(CurrentDate) ; first_deadline;

first_deadline  <  Get(CurrentDate) ; second_deadline;

 

)

 

and it works for the first and the second deadline only. I tried several solutions but no one works.

Can you kindly give me an input?

 

Many thanks!

 

Daniele

Outcomes