Skip to main content
Announcements
Qlik Connect 2024! Seize endless possibilities! LEARN MORE
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.

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
tresesco
MVP
MVP

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

=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??????????????