Unlock a world of possibilities! Login now and discover the exclusive benefits awaiting you.
Hi all,
I am trying to calculate count of days between any two given dates including boundary dates.
This count should exclude all Fridays and Saturdays ( as Fri and Sat are weekend in Middle East).
NetWorkDays() give count which excludes Sat and Sun by default.
Please suggest how can I customize or create expression to achieve the same excluding Fridays and Saturdays?
Finally it worked this way without Setting DayNames variable.
=Networkdays(DateA+1, DateB+1)
Found answer here Re: Get num of days between 2 dates
You could change the default week start and try thereafter with networkdays. Please refer: Ancient Gods and Modern Days for changing the week start.
Have a look at the attachment.
Tresco a best way.
tresesco and senpradip007 thanks for replying.
I Changed the order of day names and tried again.
SET DayNames='Sun;Mon;Tue;Wed;Thu;Fri;Sat';
I don't think the below is excluding Fridays and Saturdays.
For month of August I am getting below result.
NetWorkDays( MonthStart(date(Today())), MonthEnd(Date(Today()))) = 21
If it excludes Fri and Sat as expected, I should get 22 as result.
Please suggest.
Finally it worked this way without Setting DayNames variable.
=Networkdays(DateA+1, DateB+1)
Found answer here Re: Get num of days between 2 dates