cancel
Showing results for 
Search instead for 
Did you mean: 

Add n number of days to a date field in Compensation

vivekanandanp
Explorer
0 Kudos
81

I would like to check if there is a way to add n number of days to a date and calculate the new date and show in the compensation worksheet.

For ex 10/01/2024 i need to add 365 days and show as 09/30/2025 

Scenario:  Basically, for employees who have not completed 1 year of service the bonus payout would be based on 1 year of service hence i need to calculate the 1 year completion date and post this date to EC.

Regards

Vivek

 

Accepted Solutions (0)

Answers (2)

Answers (2)

xavierlegarrec
Product and Topic Expert
Product and Topic Expert
0 Kudos

@vivekanandanp Here is some content I found from an internal SAP discussion (each bullet point is a different comment by a different person).

  • Is my understanding correct that there is no option to calculate dateDiff between 'Today' and custom date field in custom formula? If it's possible then how we can define 'Today'?
  • I would also want to know it this is possible in order to calculate the "Years of Service" that is commonly asked for by the clients I use "dateDiff(startDate,toDate('04/30/2021','MM/dd/yyyy'))/365" but they have to update the effective date each year
  • dateDiff(startDate,toDate(lookup("defaultDate",1,1),'MM/dd/yyyy'))/365.25 then they just need to update the lookup, which has one row: "*,'04/30/2021'". Divide by 365.25 to better handle leap years
  • yes, this is a workaround if we specify the date like '04/30/2021' as mentioned by (). But what if the Customer would like to have more precise calculation with 'Today'. I believe there is no option for that, isn't it?
  • Correct - we cannot use "Today"

 

xavierlegarrec
Product and Topic Expert
Product and Topic Expert
0 Kudos

Hi @vivekanandanp 

As far as I know there is no way to do this unfortunately. I believe there is a thread on this already on the community, I'll try to find it.

I do believe there is a function in business rules that does that however and might work with compensation eligibility rules (to be tested) but I guess here you are trying to do this in a column formula.

All the best

Xavier

vivekanandanp
Explorer
0 Kudos

Thats right Xavier, i am trying to calculate a new date (existing date field + "N" of days) and show in the compensation worksheet. Alright, Thanks !!