Do not input private or sensitive data. View Qlik Privacy & Cookie Policy.
Skip to main content

Announcements
Want to see what's currently in public preview? We've pulled it all together in one place. Check it out here
cancel
Showing results for 
Search instead for 
Did you mean: 
Not applicable

Working days


How to calculate workingdays between startdate and enddate? And if enddate is null,it should consider todays date.

Labels (1)
1 Solution

Accepted Solutions
Not applicable
Author

Hi Ramya,

as a few others have said, have a look at networkdays(), you can do a check for nulls within that and use today instead

networkdays([startdate], If(isnull([enddate]),today(),[enddate]))

hope that helps

Joe

View solution in original post

8 Replies
tresB
Champion III
Champion III

Try networkdays().

maleksafa
Specialist
Specialist

networkdays (start:date, end_date {, holiday})

Not applicable
Author

Hi Ramya

Try this

Floor(Interval(StartDate-EndDate,'DD')) -> For Days

Hope it helps

Not applicable
Author

Hi Ramya,

as a few others have said, have a look at networkdays(), you can do a check for nulls within that and use today instead

networkdays([startdate], If(isnull([enddate]),today(),[enddate]))

hope that helps

Joe

MarcoWedel
MVP
MVP

=NetWorkDays(startdate, Alt(enddate, Today()))

Not applicable
Author

you will have to play about a bit, interval is good, but you may have to convert to date & time as required ...

MK_QSL
MVP
MVP

=NetWorkDays(StartDate, IF(IsNull(EndDate) or Len(Trim(EndDate))=0,Today(),EndDate))

Anonymous
Not applicable
Author

What to be done if the Week offs are different from Saturdays  and Sundays??????????????