Skip to main content
Announcements
Qlik Connect 2024! Seize endless possibilities! LEARN MORE
cancel
Showing results for 
Search instead for 
Did you mean: 
aidankinnell
Contributor
Contributor

Hours completed between two times

I have dates & times related to timecard data. The specific hours worked attract different rates, eg 11pm is at a different rate to 6am.

I want to take the start time and the end time to supplement the data with the specific hours worked. If my timecard started at 10am and finished at 1pm I want to see a marker (could be a 1) at 10am, 11am, 12pm.

I've tried various forms of the IterNo() function but can't get it working on time. I've seen it work with dates, not time.

Open to ideas!

Data is simple:

Date, Start Time, End Time

Labels (2)
2 Replies
MarcoWedel

please post some sample data and your expected result

aidankinnell
Contributor
Contributor
Author

Something like this:

Data:      
Date Start Time End Time
01/10/2022 07:00 09:30  
02/10/2022 18:00 22:00  
       
Expected:    
Date Start Time End Time Hour
01/10/2022 07:00 09:30 7
01/10/2022 07:00 09:30 8
01/10/2022 07:00 09:30 9
02/10/2022 18:00 22:00 18
02/10/2022 18:00 22:00 19
02/10/2022 18:00 22:00 20
02/10/2022 18:00 22:00 21