Skip to main content
Announcements
Have questions about Qlik Connect? Join us live on April 10th, at 11 AM ET: SIGN UP NOW
cancel
Showing results for 
Search instead for 
Did you mean: 
ahmedwank
Contributor III
Contributor III

NetWorkDays function in expression

Hi all,

 

when i use NetWorkDays function in expression to calculate the difference of working days i always have 1 more.

for exemple in my table here bellow i should have 1 because there is only 1 day between monday and friday (whithout the weekend) and i have 2. That's the same story for all my dates, i have always 1 daye extra.

i don't understand why ?

networkdays.JPG

Thanks for your help

1 Solution

Accepted Solutions
Vegar
MVP
MVP

To get your desired no of days you could subtract one day.
=networkdays(start_date, end_date) -1

Read more about the function here: https://help.qlik.com/en-US/sense/November2018/Subsystems/Hub/Content/Sense_Hub/Scripting/DateAndTim...

View solution in original post

2 Replies
Vegar
MVP
MVP

The definition of the networkdays function is as follows:

The networkdays function returns the number of working days (Monday-Friday) between and including start_date and end_date taking into account any optionally listed holiday.

NetWorkdays for Friday-Monday will as designed return 2 days and not 1.
Vegar
MVP
MVP

To get your desired no of days you could subtract one day.
=networkdays(start_date, end_date) -1

Read more about the function here: https://help.qlik.com/en-US/sense/November2018/Subsystems/Hub/Content/Sense_Hub/Scripting/DateAndTim...