Hi I have three variables with a Date as value as shown below. I need to make a decision rule to pick the correct value for variable **"Correct Date"**

**Scenario 1:**

**PI = 13/07/2021**

**Min EX = 15/07/2021**

**Max EX = 20/07/2021**

If PI is before Min Ex, i.e, (PI < Min EX):

**"Correct Date"** = Min EX(15/07/2021)

**Scenario 2:**

**PI = 18/07/2021**

**Min EX = 15/07/2021**

**Max EX = 20/07/2021**

If PI within range Min EX and Max EX, i.e, (Min EX < PI < Max EX):

**"Correct Date"** = PI(18/07/2021)

Can someone help please?

P.S. The value of PI, Min EX, Max EX will change accordingly. But the decision rules should stand.

Thanks!