Skip to main content
cancel
Showing results for 
Search instead for 
Did you mean: 
udaya_kumar
Specialist
Specialist

Working hours calculation + 24 hours

Hi,

I have data like

Activity ID, Activity Start Date, Activity End Date

1, 25-06-2018 10:00:00, 26-06-2018 11:00:00

2, 23-06-2018 11:12:00, 25-06-2018 12:00:00

3, 22-06-2018 10:00:00, 25-06-2018 15:00:00

...

The requirement is,

I should consider the duration or working hours like

for weekdays, 24 hours

for week ends, only business working hours

Only for few countries, they work on weekends but for other countries they work only on weekdays.

For example, for the Activity ID 1, the Start date is 25-06-2018 10:00:00, so the time starts and should consider the entire day (The time left for the day is 14 hours). the end date is 26-06-2018 11:00:00 (11 hours), so the duration of SLA is 14 hours + 11 hours = 25 hours.

for the Activity ID 3, the start date is 22-06-2018 10:00:00 (14 hours left for the day), then there are two days in between as weekends (9+9), then it is solved on 25-06-2016 12:00:00 (12 hours), so Duration = 14 + 9 + 9 + 12 = 44 hours.

I should consider the 24 hours in weekdays and working hours 9 to 6pm on weekends.

So how can we calculate this in the QlikView script?

0 Replies