
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
Networkdays
Good day,
I am trying to, as part of a Load process perform the NetworkDays function and I an receiving syntax issues.
At the end of my Load, I have added the following item:
NetWorkDays (Date1, Date2) AS diff days
Also, what is the underlying calendar data that Qlik uses for holidays and weekends to correctly determine the days difference.
Thank you
Mitch
- Tags:
- networkdays

- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
Which error?
this is from Qlik help
networkdays (start:date, end_date {, holiday})
Returns the number of working days (Monday-Friday) between and including start_date and end_date taking into account any optionally listed holidays. All parameters should be valid dates or timestamps.
Are your field Date1 and Date2 date or timestamp?
Working days are Mon-Fry

- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
Error says that networkdays requires 2 parameters.
Do you know the format for the holiday?
Have an example?
Thanks

- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
The first 2 parameters are always needed and the format is date or timestamp.
example
=NetWorkDays(MakeDate(2015, 1, 1), MakeDate(2015, 1, 20))
my date format, beginning of the script, is SET DateFormat='DD/MM/YYYY';
=NetWorkDays('01/01/2015', '20/01/2015')
example with holidays
=NetWorkDays(today(), today()+2) --> 3, no holidays
=NetWorkDays(today(), today()+2, today(), today()+1, today()+2) --> 0, all 3 days holidays

- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
Thank you, I have the basic format working now.
I am confused about the holidays though. Not sure how to enter them in the format provided.

- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
you can use the date in your date format, mine is SET DateFormat='DD/MM/YYYY'
2 holidays
=NetWorkDays('01/01/2015', '20/01/2015', '02/01/2015', '15/01/2015')
here you can find a more complex example

- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
Thank you very much
