You need to sign in to do that
Don't have an account?
Holidays Count
Hi,
Am trying to display list of leave applications which counts number of days from FromDate to ToDate...I have a Formula field named NoOfDays which counts the number of leave days excluding saturdays and sundays...
there were a list of holidays..now i want to exclude the holiday from NoOfDays if it falls between from and to dates....
i used
d = userinput.From_Includes_this_day__c;
d1 = userinput.To_Includes_this_day_also__c;
leave = [select id,name,Manager_Email_Id__c,From_Includes_this_day__c,To_Includes_this_day_also__c,Reason__c,CreatedDate,Approved__c,
Numberofdays__c,CreatedById from Leave_Applications__c where CreatedById=:usr.id order by From_Includes_this_day__c];
holidaysweek = [select id,name,ActivityDate from Holiday where ActivityDate>=:d AND ActivityDate<=:d1 ];
holidayscount = holidaysweek.size();
ON PAGE I USED
<apex:column headerValue="Total No of days">
{!floor(a.Numberofdays__c -holidayscount )}
</apex:column>
when am trying to use the above....counts are not getting displayed....
am not getting the proper output....
Hi Ramya !
I am not going into your code snippet .But I can suggest you try one thing :
1) go to Your Name>Setup>Administration Setup>Company Profile>Holidays
2)Click NEW to add holidays .
3)then put in your SOQL query 'holiday=true' something like that .
I am not sure this will help you or not .But if you were having problem in adding custom holidays then this will surely help .
Thanks and regards !