
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
Problem With NetWorkDays Function
Hello Guys,
I have this table:
On Qlikview to create the field number D to get the number of working days that have elapsed, I have used this script:
Accepted Solutions

- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
Hi Lorenzo,
NetWorkDays(BSTORE20, TIMESTAMP20) = 0
4/12/2016 is Sunday
Regards,
Antonio


- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
In you formula, you refer to a field named TIMESTAMP4A, but in your attached pic you show a field named TIMESTAMP20

- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
Sorry, I did copy-paste from another script to test. The correct script is:
NetWorkDays(BSTORE20, TIMESTAMP20) - 2 + (1 - Frac(BSTORE20)) + Frac(TIMESTAMP20) AS GIORNI_PASSATI_4B
The problem remain. The script work fine but I have that strange 5 values

- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
Hi Lorenzo,
NetWorkDays(BSTORE20, TIMESTAMP20) = 0
4/12/2016 is Sunday
Regards,
Antonio

- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
Ohhh man you're Amazing!!! I didn't think that the First date was on a festive day. Thanks you 😄


- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
For the first row:
NetWorkDays(BSTORE20, TIMESTAMP20) = 22, but you are getting the answer 0.
Look at your data in QlikView. I suspect that the values for BSTORE20 and/or TIMESTAMP20 are not valid timestamps in Qlikview (they are probably strings that look like timestamps). When you send them to Excel, Excel interprets them as timestamps.

- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
Date/Timestamp Format is DD/MM/YYYY (Italy standard)
and 03/12-04/12/2016 are festive days.
Regards,
Antonio


- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content

- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
Are You setting date/Timestamp format to DD/MM/YYYY ?
3 dec 2016 and 4 dec 2016


- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
Antonio, That would have never occurred to me. I think you are correct.
