Skip to main content
Announcements
Introducing Qlik Answers: A plug-and-play, Generative AI powered RAG solution. READ ALL ABOUT IT!
cancel
Showing results for 
Search instead for 
Did you mean: 
svsudhakar
Creator
Creator

Date Diff Issue

Hi ,

I got one requirement like I have to find out how many days has taken for completing the one task. it's having starting and ending dates. But while calculating the date differences I should not consider the weekend(Saturday and Sunday) and Govt holidays.

Kindly suggest on this how can I process.

I have to implement the same date diff logic with more than 10 different fileds.

1 Solution

Accepted Solutions
jonathandienst
Partner - Champion III
Partner - Champion III

Hi

Use this which will handle weekends:

NetWorkDays(startdate, enddate)

Load holidays into a quoted,comma separated list in a variable (eg vHolidays = '2014/01/01', '2014/03/21') and use to handle all non-working days:

NetWorkDays(startdate, enddate, $(vHolidays))

Or use a working day flag in a master calendar and sum the flag values to get the number of working days.

HTH

Jonathan

Logic will get you from a to b. Imagination will take you everywhere. - A Einstein

View solution in original post

3 Replies
jonathandienst
Partner - Champion III
Partner - Champion III

Hi

Use this which will handle weekends:

NetWorkDays(startdate, enddate)

Load holidays into a quoted,comma separated list in a variable (eg vHolidays = '2014/01/01', '2014/03/21') and use to handle all non-working days:

NetWorkDays(startdate, enddate, $(vHolidays))

Or use a working day flag in a master calendar and sum the flag values to get the number of working days.

HTH

Jonathan

Logic will get you from a to b. Imagination will take you everywhere. - A Einstein
MK_QSL
MVP
MVP

Please check enclosed file...

svsudhakar
Creator
Creator
Author

Thank you this working fine