i was hoping you could help me. i now have a working calculation to calculation working hours between two dates however a start date may be on a weekend. so i want to saying if it is on a weekend start the calculation from the start of the working day on a monday.
if the start date and close date are both on a weekend then the calculation should return a zero or if the end date is on a weekend count the end date is it was at close of business on a friday.
can you help with my issue. as currently the workinghours cal returns a minus number when the start or end date is on a weekend
Use lastworkingday(MyDate,1) to get the first next workday. If MyDate is a saturday or sunday it will return the date of the next monday, otherwise it will return MyDate. Likewise firstworkingday(MyDate) will get the friday before if MyDate is a saturday or sunday and otherwise return MyDate.
i am really struggling to understand the logic, as i am not the best at Qlikview,
is it possible you can explain it too me. the solution i have posted above works but if it is outside office hours or at a weekend then the hours return a negative number.
What i am looking for is the following.
i have 2 dates Case_created_date and case_close_date
Working hours are 8am to 6pm.
If a case is opened outside office hours it will start the calculation from the next working day at 8am. If the case is closed outside working hours it will stop the calculation at the last working day at 6pm.
31-10-2012 19:00:00 01-11-2012 10:00:00 i would expect the calculation to return 2 hours.
26-10-2012 14:00:00 28-10-2012 06:00:00 i would expect the calculation to return 4 hours.