Hello All
1. Need to query Number of Years of service,Number of active days in Month,Year (Deducting Inactive days) in payroll to make payment of a wage type, how to query?
2.We have a payment of Other allowance as Rs.1000 but for this Jan2016 alone we need to pay 10% extra for an employee group & Subgroup differently, how to do it (From February onward it will be RS.1000 again for the same EG&ESG combinations).
Reg
SK
hi sk...
next u want to know the total number of days in a particular month of year, right?
date ld_Date = Date( "2016/1/18" )
Integer li_days[12]={31,28,31,30,31,30,31,31,30,31,30,31}
Integer li_month, li_year,li_daysinmonth
li_month =month(ld_Date)
li_year = year(ld_Date)
li_daysinmonth = li_days[li_month] // --Leap year or not
If li_month=2 Then
If ( (Mod(li_year,4) = 0 And Mod(li_year,100) <> 0) Or (Mod(li_year,400) = 0) ) Then
li_daysinmonth = 29
End If
End If
The above code will give u the total number of days in a month and then u can deduct inactive days from li_daysinmonth
Happy coding!
Best regards,
Add a comment