WorkCalendarSched workCalendarSched;
TransDate TransDate=today();
TransDate start,end;
counter workingdays;
counter totaldays;
WorkCalendarTable WorkCalendarTable;
super();
select firstOnly WorkCalendarTable;
start =DateStartMth(TransDate);
end = endmth(TransDate);
workCalendarSched = new workCalendarSched();
while(start<end)
{
totaldays++;
if(workCalendarSched.isdateopen(WorkCalendarTable.CalendarId,start)==true)
{
workingdays++;
}
start++;
}
totaldays variable will return calendar days of current month
workingdays variable will return workingdays of current month
TransDate TransDate=today();
TransDate start,end;
counter workingdays;
counter totaldays;
WorkCalendarTable WorkCalendarTable;
super();
select firstOnly WorkCalendarTable;
start =DateStartMth(TransDate);
end = endmth(TransDate);
workCalendarSched = new workCalendarSched();
while(start<end)
{
totaldays++;
if(workCalendarSched.isdateopen(WorkCalendarTable.CalendarId,start)==true)
{
workingdays++;
}
start++;
}
totaldays variable will return calendar days of current month
workingdays variable will return workingdays of current month
No comments:
Post a Comment