Qlik Community

QlikView Creating Analytics

Discussion Board for collaboration related to Creating Analytics for QlikView.

skh
Contributor

Calculating Networkdays using two dates

Hi,

I have a start date and a finish date and i would like to calculate the number of working days between the start date and end date.  At the moment, in the script i have [finish date] - [start date] as Days which give me a count, however this is not excluding the weekend and therefore the number is incorrect.

i have also tried networkdays([finish date], [start date]) as Days but this just gives me a 0 and 1 flags.

Does anyone know the syntax that i need to use?

Tags (1)
1 Solution

Accepted Solutions
MVP
MVP

Calculating Networkdays using two dates

networkdays function should be correct, but try first parameter start date, second end date.

4 Replies
MVP
MVP

Calculating Networkdays using two dates

networkdays function should be correct, but try first parameter start date, second end date.

skh
Contributor

Calculating Networkdays using two dates

Hi Swuehi, thanks for the response.  Can you please clarify, i'm not sure what you mean?

Thanks,

Sunil

marcuspersson
New Contributor III

Calculating Networkdays using two dates

I guess he means just to change the order of the parameters: networkdays([start date], [finish date]).

skh
Contributor

Calculating Networkdays using two dates

Ahh i see - yes that worked!  Sometimes youre not able to see the wood from the trees!!

Thanks very much.

Sunil