Unlock a world of possibilities! Login now and discover the exclusive benefits awaiting you.
Hi guys,
My data has two columns: StartDate and EndDate, from the script, I would like to count intervals between these two dates, regardless of weekends.
For example, if StartDate is 05/13/2019 (Mon), EndDate is 05/14/2019 (Tue), Interval will be 1 day;
If StartDate is 05/10/2019 (Fri), EndDate is 05/14/2019 (Tue), Interval will be 2 rather than 4 days.
How should I write the expression? Thanks in advance!
Check out the NetWorkDays function.
NetWorkDays (StartDate, EndDate) as NetWorkDays
https://help.qlik.com/en-US/sense/February2019/Subsystems/Hub/Content/Sense_Hub/Scripting/DateAndTim...
Ps: NetWorkDays counts both start and end as dates so you do need to adjust your interval if you don't want both days included into your count.
Check out the NetWorkDays function.
NetWorkDays (StartDate, EndDate) as NetWorkDays
https://help.qlik.com/en-US/sense/February2019/Subsystems/Hub/Content/Sense_Hub/Scripting/DateAndTim...
Ps: NetWorkDays counts both start and end as dates so you do need to adjust your interval if you don't want both days included into your count.