pape
pape

Reputation: 239

Qlikview - calculate number days between two dates except sunday

how can I calculate number of days between two dates except sunday. I want to calculate number of days between

date1 = 17-08-2016;
date2 = 3-09-2016;

I try

NetWorkDays(date1, date2)

but include include only working days...and I want to include working days and Saturday...

Any idea?

Upvotes: 0

Views: 3672

Answers (1)

Skip Intro
Skip Intro

Reputation: 860

As per Ralf Becher on the QlikView Community site, add this line to your load script:

floor(((Date2 - Date1)+1)/7)*6 + mod((Date2 - Date1)+1,7) 

+ if(Weekday(Date1) + mod((Date2 - Date1)+1,7) < 7, 0, -1) as Workingdays_6 

then use Workingdays_6 in your count.

More details, including example qvw

Upvotes: 1

Related Questions