AnsweredAssumed Answered

Problem calculating a conditional date

Question asked by AlejandraGarcia on Oct 24, 2014
Latest reply on Oct 25, 2014 by AlejandraGarcia

Title

Problem calculating a conditional date

Post

I would like to calculate debt payments by fortnights. If someone pays between the 1st and 6th day of a month, the next payment would have to be on the 16th; If someone pays between the 14th and the 20th of a month, the next payment would have to be on the 1st of next month:

Example

Last payment field (no problem with this field): Oct 19, 2014

Next payment field (I can't calculate this field): Nov 1, 2014

This is the calculation I'm using for Next payment field, but it always shows day 16, so the conditional is not working:

If ( Day ( Date | Last Payment  ≥ 1 and Day ( Date | Last Payment ≤ 6 ))  ; Date ( Month ( Date | Last Payment) ; Day ( 16 ) ; Year ( Date | Last Payment ) ) ; If ( Day ( Date | Last Payment  ≥ 14  and Day ( Date | Last Payment  ≤ 20 )) ; Date ( Month ( Date | Last Payment + 1) ; Day ( 1 ) ; Year ( Date | Last Payment ))))

Thanks

Outcomes