Qlik Community

New to QlikView

Discussion board where members can get started with QlikView.

Announcements
Read about Qlik’s Response to COVID-19 Read the Letter, Join the Group.
Highlighted
New Contributor

Calculating hours between two dates/times but ignoring any hours before or after specified times

Quite new to Qlikview, so struggling a little with this one - I am trying to calculate the number of hours between two date/time fields in my script, but ignoring any hours before 9am or after 5pm on Mon, Tues, Thurs & Fri and after 1pm on Wednesdays. For example if I have an activity that starts at 8am and finishes at 12pm, I only want to report 3 hours, and similarly if I have an activity that starts at 4pm and finishes at 6pm I only want to report 1 hour. I hope this makes sense.

3 Replies
Highlighted
MVP
MVP

Re: Calculating hours between two dates/times but ignoring any hours before or after specified times

Highlighted
Esteemed Contributor

Re: Calculating hours between two dates/times but ignoring any hours before or after specified times

Partner
Partner

Re: Calculating hours between two dates/times but ignoring any hours before or after specified times

Hi,

I think you can use the Interval function.

https://community.qlikview.com/thread/107715