Unlock a world of possibilities! Login now and discover the exclusive benefits awaiting you.
Hello,
could you please help me calculating a prorata No. of days ?
My formula works fine to find the total No.of days. However, if I want to calculate the prorata of days limiting the end date, up until the 31/12/2010 I cant get it right...
thanks for your help
The formulas I used:
(num(interval(date([End Contract],'DD/MM/YYYY') - date([Start Contract],'DD/MM/YYYY')),'####')) as Totaldays => OK
(num(interval(date([End Contract]='31/12/2010','DD/MM/YYYY') - date([Start Contract],'DD/MM/YYYY')),'####')) as Prorata => NOT OK
Thanks
I think you should have it written this way, without "[End Contract] =" :
(num(interval(date('31/12/2010','DD/MM/YYYY') - date([Start Contract],'DD/MM/YYYY')),'####')) as Prorata => NOT OK
Thank you for your answer Miha. You were right, it worked when I changed to your suggestion.
However, I realised I mistook and changed my formula to find the correct No. of days for the contracts ending in 2010. I paste my formula just in case it can be useful to other people. Thanks again.
(num((date(IF([End Contract]<=yearend(makedate(year(today()))),[End Contract],YearEnd(makedate(year(today())))),'DD/MM/YYYY')),'####')) as min_end_date_contract