Unlock a world of possibilities! Login now and discover the exclusive benefits awaiting you.
Hi Guys,
I'm kinda stuck with this problem which is like the last step to wrap up the business logic for my app.
I have to calculate time difference for a Datetime column for successive dates. For example
RequestID | Status | CreationDate | Difference |
1 | Originator | 9/5/2018 12:18 | - |
1 | Processor | 9/10/2018 12:20 | Diff |
1 | Validation | 9/10/2018 17:20 | Diff |
1 | Closed | 9/12/2018 9:20 | Diff |
Now when I take the difference for first and second date, I'll get a weekend(sat and sun) i.e. 48 hours i need to deduct from the total difference. Now this is just one example, there can be n number of weekends or holidays in between . Can anyone help me write the logic where I can get the exact number of weekends/holidays in between each two successive dates then i can just multiply it with 24 to get total hours to deduct.
Any help or suggestions will be hugely appreciated. I need to get this done to get over the line as this is quite obviously a blocker for me.
Thanks in advance.
P.S. I'm working in Qlik Sense but i guess there won't be any difference in logic in QlikView.
Pranav
To determine weekends and holidays use NetworkDays()