Do not input private or sensitive data. View Qlik Privacy & Cookie Policy.
Skip to main content

Announcements
Want to see what's currently in public preview? We've pulled it all together in one place. Check it out here
cancel
Showing results for 
Search instead for 
Did you mean: 
Not applicable

NetWorkDays: Excluding Friday and Saturday between two dates

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?

Labels (1)
1 Solution

Accepted Solutions
Not applicable
Author

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

View solution in original post

5 Replies
tresB
Champion III
Champion III

You could change the default week start and try thereafter with networkdays. Please refer: Ancient Gods and Modern Days for changing the week start.

senpradip007
Specialist III
Specialist III

Have a look at the attachment.

sujeetsingh
Master III
Master III

Tresco a best way.

Not applicable
Author

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.

Not applicable
Author

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