I am logging Sickness in salesforce and have a start and end date. For reporting purposes i need to be able to assign a 1 to each of the working days between these 2 dates.
Then when i report i can do a sum/count of the number of days that sit in each month where people are sick.
Thus, if I want to show a user as having a holiday on the following days: 29th Jan 30th Jan 31st Jan 1st Feb 2nd Feb and so on - they would have a start and end date recorded against the sickness record, and when i put it in a matrix report it would show sick days on each in that range.
Currently, this works fine if the sickness is all in one month - e.g. 4th Jan - 11th Jan
However when i go over the month end e.g. 29th Jan - 9th Feb i can only report on either the start or end date not split out the working days that fall into each month.
BusinessHours
object and standard class together to do this sort of calculation. As long as you can useApex
...