Link to home
Start Free TrialLog in
Avatar of bmkdubai
bmkdubaiFlag for United Arab Emirates

asked on

how to find due date

Dear all
In my employee data i have the following
joindate, basic salary. After every year from join date i have to pay one basic salary along with the monthly salary.

When preparing the monthly salary, what is the best method to  find out which are the people basic salary is due on that particular month.

ASKER CERTIFIED SOLUTION
Avatar of Guy Hengel [angelIII / a3]
Guy Hengel [angelIII / a3]
Flag of Luxembourg image

Link to home
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
Start Free Trial
months_between(trunc(sysdate),join_date) in (12,24,36,48,60...) >=  then pay one more month basic sal along with the salary.

There are many ways to do this. That is just one method.
where mod(months_between(trunc(sysdate,'mm'),trunc(joindate,'mm)),12) = 0
Missing a quote -
where mod(months_between(trunc(sysdate,'mm'),trunc(joindate,'mm')),12) = 0