Skip to main content
Announcements
Qlik Connect 2024! Seize endless possibilities! LEARN MORE
cancel
Showing results for 
Search instead for 
Did you mean: 
Not applicable

Days counts between two dates.

Hi All,

I have a start and end date and I wish to find how many week days(Mon-Friday) and week end (Sat-Sun) were between the dates.

for example :

If Start_date=17.12.2014(Wed)

End_date = 22.12.2014(Monday) , I want  to know the how many weekdays and week end fall between them.

Both the dates exclusive.

desired output:

Number of weekdays                Number of Weekenddays

2( for eg.Thu,Friday)                 2(Sat,Sun)



Can someone help me here?


Thanks in advance

8 Replies
prat1507
Specialist
Specialist

Use =NetWorkDays('2017-06-01',(today())) for counting weekdays

and subtract it from the total no. of days  to count the weekends.

avinashelite

Try like this

NetWorkDays(StartDate,EndDate)

sunny_talwar

May be this

WeekDays

NetWorkDays(Start_date+1, End_date -1)

WeekEnds

End_date - Start_date - 1 -NetWorkDays(Start_date+1, End_date -1)

Not applicable
Author

Hi Pratyush,

Can you give me example for weekend counting.

Not applicable
Author

Hi Sunny,

This works perfectly!!. .Thanks for coming back .

Can you please explain the logic ?

Thanks..

Not applicable
Author

How do I mark this thread as Resolved?

sunny_talwar

Which of the two expressions are you not able to understand? First one is a function available in QlikView and Qlik Sense

networkdays - script and chart function ‒ Qlik Sense

While other is just doing Total Difference - Working Days.