Qlik Community

QlikView Scripting

Discussion Board for collaboration on QlikView Scripting.

Announcements

Breathe easy -- you now have more time to plan your next steps with Qlik!
QlikView 11.2 Extended Support is now valid through December 31, 2020. Click here for more information.

sumitjadhav
Contributor II

there is starttime and endtime ,i want to calculate date and time neglecting sunday and i want to calculate time in hours and only consider 9 working hours per day?

there is starttime and endtime ,i want to calculate date and time neglecting sunday and i want to calculate time in hours  and only consider 9 working hours per  day?

2 Replies

Re: there is starttime and endtime ,i want to calculate date and time neglecting sunday and i want to calculate time in hours and only consider 9 working hours per day?

May be something like this:

=Interval((Floor(WeekEnd(StartTime, 0, 0))-StartTime) + ((Floor(WeekStart(EndTime))-Floor(WeekEnd(StartTime, 0, 0)))*6/7) + (EndTime-Floor(WeekStart(EndTime))), 'd') * 9

The above is assuming that StartTime and EndTime are just dates.

MVP
MVP

Re: there is starttime and endtime ,i want to calculate date and time neglecting sunday and i want to calculate time in hours and only consider 9 working hours per day?

Here is a thread with some suggestions if you need to handle timestamps.

Re: Calculate hours between two Date/Time strings