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

Announcements
See why IDC MarketScape names Qlik a 2025 Leader! Read more
cancel
Showing results for 
Search instead for 
Did you mean: 
Not applicable

Adding hours together


Hi there,

I am having difficulty adding hours together.

I have two feilds with the number settings set to 'time'.

This allows me to see the data in hours and minutes.

I am calculating the amount of hours each employee is logged in during a day.

I then want to add all of these hours together to get the total hours worked for the week.

However, when an employee works over 24 hours in one week, the clock seems to start back to zero.

For example, if an employee works 22 hours one day and 3 hours the next, the result is 1 hour.

Is there a way to make QlikView calculate this so that in the example above, i would get 25 hours instead of 1?

I would great;y appriciate some help with this.

Thanks

3 Replies
Brice-SACCUCCI
Employee
Employee

Hi,

can you provide a sample of the data or a basic QlikView app?

Date and time questions really depend on the format of the data.

Thanks,

Brice

Not applicable
Author

Hi Brice,

Please find sample data attached.

Thanks Sorcha

Gysbert_Wassenaar
Partner - Champion III
Partner - Champion III

Try something like this:

LOAD Station,

     [Time On],

     [Time Off],

     [Time Spent On],

     [Time Spent On1],

     interval([Time Off] - [Time On],'hh:mm:ss') as TimeSpentOn

FROM

[Sample Data.xls]

(biff, embedded labels, header is 1 lines, table is [Sheet1$]);


talk is cheap, supply exceeds demand