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

Announcements
Save $650 on Qlik Connect, Dec 1 - 7, our lowest price of the year. Register with code CYBERWEEK: Register
cancel
Showing results for 
Search instead for 
Did you mean: 
Not applicable

calculation of overnight working times

Hi,

I am trying to calculate overnight working shifts and I was wondering how to epress this in the script:

Clock in          Clock out          Duration

22:00:00          07:00:00          09:00:00       = C9-B9+(B9>C9) and cell format :mm

22:00:00          07:00:00          9.00             = C9-B9-(B9>C9))*24 and cell format is number with 2 digits    

Thanks for your help!

1 Solution

Accepted Solutions
swuehl
MVP
MVP

Not sure if I understood what you want to tell with the excel style expression, but maybe like

=interval('09:00'-'22:00'+if('22:00'>'09:00',1,0))

or

=interval(EndTime-StartTime+if(StartTime>EndTime,1,0))

View solution in original post

2 Replies
swuehl
MVP
MVP

Not sure if I understood what you want to tell with the excel style expression, but maybe like

=interval('09:00'-'22:00'+if('22:00'>'09:00',1,0))

or

=interval(EndTime-StartTime+if(StartTime>EndTime,1,0))

Not applicable
Author

Danke!