Salary Component Formula - Age Based Calculation

We’re trying to configure a deduction component where the deduction percentage changes based on Age. But, couldn’t find a way to achieve this without long route of creating different structures for each age and manually switching the structure when Employee’s Age slab changes.

Is there any way of deriving Employee’s Age in Salary Component Formulas?

Is there a way to expose methods from Employee DocType in Formulas?


You can configure Salary Component with conditions like

date_of_birth > date(dd, mm, yyyy)

Please note that date_of_birth is a field of Employee document.

Hello Anoop,

Is there a way to derive dd, mm & yyyy for exactly say 60 Years ago in formula? Or any way to get a date X years ago?

If I put a static values – say date(01, 09, 1959) – as reference for comparing against date_of_birth , the formula would become invalid the very next month.


Hi Friends
Same requirement for me. Age Based Calculation. Need to apply in formula. How to achieve it.
Please help.