Do not input private or sensitive data. View Qlik Privacy & Cookie Policy.
Skip to main content

Announcements
Qlik Open Lakehouse is Now Generally Available! Discover the key highlights and partner resources here.
cancel
Showing results for 
Search instead for 
Did you mean: 
Anonymous
Not applicable

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

Anonymous
Not applicable
Author

Hi,

I think you can use the Interval function.

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