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.

bmkdubaiAsked:
Who is Participating?
 
Guy Hengel [angelIII / a3]Connect With a Mentor Billing EngineerCommented:
I would start to compare:
to_char(sysdate, 'MM') = to_char(joindate, 'MM')

it could be +- 1 month (cf add_months function) ...
note that to_char returns a string, and not a number ...
0
 
Naveen KumarProduction Manager / Application Support ManagerCommented:
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.
0
 
awking00Commented:
where mod(months_between(trunc(sysdate,'mm'),trunc(joindate,'mm)),12) = 0
0
 
awking00Commented:
Missing a quote -
where mod(months_between(trunc(sysdate,'mm'),trunc(joindate,'mm')),12) = 0
0
Question has a verified solution.

Are you are experiencing a similar issue? Get a personalized answer when you ask a related question.

Have a better answer? Share it in a comment.

All Courses

From novice to tech pro — start learning today.